Welcome to TRS
2001 and up Rangers with 4.0l SOHC engines have 207HP 238ft/lb torque
The 5.0l had 205 to 215HP, 280ft/lb torque
So there is some improvement, but is it worth the money????
On the 2000 and earlier Rangers with 4.0l OHV it was 160HP max., so worth it to swap
If your 4.0l SOHC is bad then look at fixing or replacing it, then sell it and buy an already converted V8 Ranger they come up for sale fairly often, some times an "partially" completed, lol.
But if your dead set on doing it then yes, the 2003 and earlier Rangers are doable, 2004 and up would be much much harder because of the HEC dash and CAN systems