Welcome to genvibe!
oddly enough, the reverse of this came up last year, in
viewtopic.php?p=534076 where Lawsonland put an 03 door on a 2008, and found the wiring different. Lawsonland ended up swapping the door's internal wiring harness and lock mechanism from the 08 into the 03 door. Maybe that would work for you, to swap the harness and lock mechanism from your old 04 door into the new 05 door.
While the doors 03-08 doors are mechanically the same, there are probably three different electrical configurations, the original 03-04, the updated 05-08, and 2nd gen 09-10s, so 03 or 04 would fit your 05 door
In that thread Lawsonland offered up an 03 harness and parts, but that was last July, don't know if its still available, but might be worth asking if your old door parts are beyond re-use