Dodge Ram Transmission Compatablity

Can I replace a 4-Speed 46RE transmission with a 5-Speed 45RFE Transmission? I have a 5.9L 02’Ram pick-up with the 46RE tranny and my friend is upgrading his 5.7L Hemi 04’ Ram Pick-up with the 45RFe tranny. I wanted to know if i could put the smoother 5-speed tranny in my truck?