V as the 8th letter just means Flex Fuel 3.0l, U is gas only 3.0l
No 4.0l, or any other engine size, could be used in place of the 3.0l.
You will need to swap the engine AND transmission, also the computer and wiring.
If you want to do a swap for more power then skip the V6's and go to a V8, same amount of work but more power in the end.
Explorer V8 with trans and computer/wiring is a popular choice.
FYI, you can use any Ranger 3.0l in your truck as long as you use your upper and lower intake from the Flex Fuel engine, Flex fuel engines have larger injectors