The way to scp files to a server which you can't access directly is to create an ssh port forward (-L) from your local machine to a gateway machine and then scp to the forwarded port on your local machine:
Step 1: Set up a port forward to a gateway machine
ssh user@gatewayIP -L 44444:targetIP:22
Step 2: scp the file to the local port and it will be copied to the target machine through the ssh port forward you set up previously
scp -P 44444 myfile.txt [email protected]:~