Kind of a big project but not too hard, yes any other transmision that has the same code as yours will fit, even it it was from a V6, The tail peice and transfercases are all swappableas well. just make very sure all connections and plugs are the same.
The biggest thing to watch out for would be electronic kickdown vs manual kickdown cable, your truck should have a manual kickdown, that will be the main difference. other than that you should be good to go.
This is a huge pain in the ass to remove in your garage and I can't imagine putting the transmission back in without the truck on a lift and the transmission jack we used at the u fix it place.
Be careful with the fluid lines and make sure all is unplugged before you drop the transmission out.
these pics walked me through most of it so here: (taken from ttora)
3. Next, drain the transmission fluid:
4. Disconnect the rear driveshaft (Note: be sure that your rear wheels are chucked for safety):
5. Disconnect the shifter and all other sensors on the transmission (Note: the kick down cable can be disconnected from the throttle body):
6. Disconnect the ATF lines from the transmission using a flare wrench:
7. Remove the inspection plate from the front of the tansmission:
8. With a ratchet on the main pulley of the motor, turn the motor until you are able to access the first flex plate bolt:
9. With someone holding the ratched on the main pulley, remove the flex plate bolts one at a time:
10. Next remove the main transmission bolts. There are a total of 6 main bolts (17mm) and 2 bolts for the starter (14mm). The easiest way to access these bolts was with a universal joint (aka swivel joint) and about 24-30 inches of extensions. Removing middle bolt:
Removing upper bolt:
A shot of the clearance from the top removing one of the upper bolts (NOTE: if you are having problems with getting the upper bolts out, you can remove the shifter from the interior and use the ratchet from the top):
11. Using a block of wood and a jack, support the transmission from the oil pan:
12. Once the weight of the transmission is supported by the jack, remove the bolts holding the rear mount to the transmission:
13. Remove the rear crossmember:
14. Before removing the transmission, doublecheck to inusre that you've disconnected everything from the transmission.
15. With another set of hands, slide the transmission back to pull it off the motor. Lower the transmission down and set it on a board to make it easier to slide out from under the truck: