So the 3.0 out of the 2005 would work for the 99?
Yes, it will, from a Ranger to a Ranger, if both have 3.0l
Ford used the same 3.0l OHV Vulcan engine in Rangers from 1991 to 2008
If your '99 is Flex Fuel you want to swap your upper and lower intake to the 2005 engine if it isn't Flex Fuel.
And you may want to do that in any case since the wiring harness for the upper intake sensors can be different lengths on different years.
Or just swap the fuel injectors, Flex Fuel computer expects larger injectors to run ethanol E85 fuel, whether or not you ever do doesn't matter, the injectors for gas only are smaller so Flex Fuel computer will calculate the wrong "open time" if fuel injectors are not the same, which won't hurt anything but you will get CEL(check engine light) because calculations don't match what computer expects.
8th digit in the VIN tells you what engine the truck came with, "U" = 3.0l gasoline only, "V" = Flex Fuel, gas or ethanol
The 3.0l Vulcan motor did have changes made over the years but that wouldn't effect a full engine swap.
Have a read here about the changes:
http://www.therangerstation.com/tech_library/3_0-build.shtml
You will need to remember the year of the new motor, because engine specific parts can be different.
I would change the rear main seal on the new engine, it is only $8 and hard to get to once engine is installed