It does not work like that
04 sport trac is a little different then a 96-01 explorer 5.0
The sport trac has a different PATs system, it has a different speed sensor system, fuel system has also changed, and the body computers are not compatible.
So you have to do a conversion
You cannot just bolt in the wiring from bumper to bumper from the 5.0 truck for these reasons.
The easiest way to do the conversion from 2004 4.0 SOHC drivetrain to a SBF based 5.0 drivetain is to perform a 5.0 conversion just like in the link above
There is not much wiring really, just the same old stuff, you have to add the 5.0 pats to the sport trac, you have to modify the alternator charging harness, the starter harness and the air conditioning, as well as move a few other wires around.
You have to do some simple plumbing to the fuel system and sort out the speed sensor signal to the computer and dash.
You are creating MUCH more work for yourself by trying to shove a 5.0 explorer inside of the sport trac shell, there are lots of things that will jump up and bite you.
If you build a 5.0 sport trac buying parts for it is not hard, basically its a 04 trac with a 01 5.0 engine and trans, not terribly difficult to sort out.
The link above I documented every single step required to convert a 02-05 trac to a 98-01 5.0 awd drivetrain, every single step.
Now with that said there are several ways to skin a cat, and I am SURE you could basically convert the trac to a complete 5.0 wiring truck, you will have much to sort out like all the light sockets are different, the explorer is expecting to see a 5th door (rear hatch) with wiper, defrost, locks, the 5.0 only had pats A, and the 5.0 trucks used a different ABS system, keyless entry, and more, these things can all be overcome, but why?
More work, similar results.