Possible just not practical.
On the plus side the '00 4.0l OHV and the '04 4.0l SOHC have the same transmission bolt pattern and motor mounts.
And both are 3rd Generation bodies so fit will be fine, assuming you swap most engine bay components.
That's IF it is a manual trans, if '04 is an automatic you need to bring the trans with it.
On the downside is the wiring, you have to change computers and engine wiring, and PATS so ignition cylinder, and not sure on the dash interface, I think the computer ran most if not all dash gauges by '04
And the horsepower gain won't be significant running regular gas.
Selling the 4.0l SOHC engine/truck and using that money toward a V8 swap would be more practical.
Significant power gain, and on regular gas, and pretty much the same cost in time and money