If you use the 04 ECM, you will have to use the 04 MPEM(07 doesn't have an MPEM), LCD gauge, and wiring harnesses from the 04. You can't just replace the ECM, it won't work.
I would change the crank to the 07. I would also use the 07 head if it is salvageable even if you have to replace the 4 valves from the #3 cylinder. The reason is because the 04 valves are hollow sodium filled and suspect at best. They drop valves on occasion and even more likely the older it gets. 07 should have the newer solid valves. If you use the 07 head, you'll have to remove the oil regulator in the 04 block as well.