Well, assuming that they're both automatic transmissions, they should both have the 4R70W. If that's so, then all 4R70W's are wired the same.
So the problem would not be the wiring, but the actual casing on the transmission. The 4.2L engine 4R70W's use a different casing then the 4.6 and 5.4L motors. The difference being the bell-housing, so the 4.6 trans won't bolt up to the 4.2.
Sorry for the bad news lol, but better you know now than realize it after taking the trans out I guess.