Well "new" now-a-days just means "NEVER EVER Tested", so grain of salt on any new part
So the contacts on the "new motor" could be the issue if motor moves
In the 1997 4WD diagram you can see that the yellow/white wire is the common wire for the contacts
Yellow/white wire connects to A, B, C, or D wire depending on contact plates position
I do not know what contact(A, B, C, or D) should be closed for each position, 2wd, 4high or 4 low
But if vehicle is in 2WD now then its contact doesn't seem to be working or GEM would move motor farther
In current position yellow/white wire on Motors connector should show 0 ohms(continuity) to A, B, C, or D, should be just one of these
Yes, you could use a long wire and test continuity for each vehicle side wire to GEM connector
But it should be a problem with the yellow/white wire or the 2WD wire(A, B, C, or D), as GEM wouldn't know there is a problem with the other 3 wires until motor/plate moved past that spot and didn't find it