The big difference (assuming they're both M30's) is that the '05 forward got its own TCM (transmission control module) attached to the trans case,, split off from the PCM (which then became the 'ECM', of course). It's on the passenger side, btw, above / near the 2nd servo (4" round thingy near the pan).
Now, with the extra control module...you guessed it. The wiring harness changed (at the trans end, at a minimum)
Since you went newer > older vehicle, your PCM s/b able to control the 'old' (actually newer) trans, if you ever put it in. BUT - you'll need to account for that wiring, disconnecting it from the TCM (the easy part) and potentially changing some pinouts on the harness (again, do-able, but a little more work). IIRC, the ATCO repair manual will detail the pinouts (might be easier to understand than the GM Service Manual)
A subharness might be available, but I think you'd really only benefit from that if you were going to an '05 from the '04 (b/c you wouldn't have it on the '04 trans). Keep it in mind, tho.
If you get the pinouts wrong? Not good. In a best-case, you'd operate in fail-safe mode (3rd gear), probably with a ton of 'P' codes on your reader. It gets worse from there. So don't screw it up...LOL
AFAIK, that's the only difference between the two MY, w/ regard to the trans. The actual mechanicals s/b identical (or nearly so)
Oh - is the '04 a 4WD, too? If not, you can dispense with the tailpiece that connects to the transfer case / front driveshaft (b/c you won't have one). The old one ('05 trans) has the tailpiece, so you're good. If you can, salvage the t-case from the old one, too - they ain't cheap to replace.