Why is my transmission not shifting right?

I have a 94 ford ranger and I just put a different automatic transmission in it from the junkyard and it does ok but it doesn't shift right, it shifts in to drive and reverse just fine and the 4 wheel drive works good in it, but when I drive it doesn't want to change gears for some reason, it ll have to get up to about 3000 RPMs then I have to let off the gas before it will cahange and then sometimes it still won't. I checked the vacuum lines and the transmission filter is good. Does anyone have any idea why this is happening?

Re-check the vacuum line to the vacuum modulator on the side of the transmission. Pull it off while the engine is running and check to make sure it has suction. Check the TPS sensor with an ohmmeter to make sure it sweeps evenly on both side of the armature.

Kick down rod adjustment
tps
band adjustment
bad trans

Replace the shift solenoids.

That's what happens when you buy a tranny from a junk yard.

Different transmissions are set up for the vehicle they are fitted to.
They do not just swap to a different vehicle.

If it has a cable for the shift adjustment you have it adjusted wrong.
If there's a vacuum dashpot on the tranny around the ATF pan it may be bad or you may have the vacuum line hooked up to the wrong port.