2003-2004(early) are one version.
2004.5-2007 are another version.
2003-2006(early) use 18mm dowels to locate the head to the block.
2006.5-2007 use 20mm dowels.
20mm dowel heads can be used on 18mm blocks with 20-18mm stepped dowels. And some other stuff.
As frustrated as you are. The setup you bought (04.5-07) is a better setup.
The ICP sensor is in a better location, the HPOP is typically more durable, and more.
You have a couple choices. Switch everything over and get an 04.5-07 wiring harness or keep your 03-04 stuff and put it on the 04.5 engine.
If it’s in the budget, I would get an 04.5-07 wiring harness and use the newer parts.
What is the story on the truck? Meaning why do you have a second engine? I don’t know any background on your situation. Sorry. Once I do I can help determine what you should or shouldn’t switch over.
Early 04 - The cross over section at the rear of the intake manifold has been eliminated.
Engine harnesses and glow plug harnesses for a 2004 can be difficult to ensure you get the correct one due to the changes. There are actually 3 versions of the 2004 model:
1. 2003 engine
2. Late 2004 engine (this is identified by a horizontal GPCM orientation and took place on 9/29/03 when the ICP was moved).
3. Late/Late 2004 engine (this took place on Dec 1, 2003 when the GPCM bracket was been redesigned, identified by a vertical GPCM orientation). This change improved long term reliability of the engine wiring harness. The engine sensor wiring harness and both glow plug harnesses were changed. In order to increase the serviceability of the glow plugs, the glow plug buss bar has been replaced with a new glow plug harness. This provided flexibility in the harness, to ease removal of glow plugs
The 04.5 is still the (weak design) swash plate design HPOP. The V-4 piston style (very reliable) didn't get installed until 05. ONLY with the 05 pump change, the failure prone STC fitting on the HPOP discharge was introduced. It requires the one-piece upgrade (this eliminating the STC fitting) for reliability. The GPCM bracket was modified to accept the repositioning of the ICP Sensor. An earlier GPCM bracket will not work on an updated 2004 MY engine.
The crankcase breather was externally mounted on the valve cover because of the redesign of the high-pressure oil rail (04.5)
The 04.5. identified by the 04 model year with ICP on the valve cover, has all the weak designs, weak HPOP, leak-prone dummy plugs and standpipes. Also, the longer (and weaker) fin-type EGR cooler was introduced.
The 05 has a different HPOP cover, different IPR mounting, and different branch tubes.
Sometime in 05 the EBP sensor mounting changed. Not a big deal though.
Also, some 05's have a MAF sensor, some don't.
Oh, also in late Sept 04 when the oil rail changes were made, the front cover was changed to accept the larger (100mm) water pump.
The cam was changed in 04 and, due to a design change of the piston (combustion chamber on the piston has been modified), the glow plug was been made shorter by 1.2 mm. Very important not to use a longer flow plug when the shorter one is required!
LOTS of other changes, but I believe those (along w/ the commonization changes in January of 06 that Crawler mentioned, were the big ones.