The 4WD lights coming on with the key is a Bulb test, nothing to do with 4WD part, just FYI.
2001 doesn't use computer or GEM for 4WD, hope you didn't replace them because of this issue
It has a 4x4 control module
It is behind passenger side kick panel
And these were known failure points
And is most likely your problem
But just confirm fuse#13 in engine bay is good, 20amp
And fuses #5, #10, #11 in cab fuse panel are good
If shift motor was bad 4WD light would flash because motor wasn't moving when 4x4 control module sent it power.
And with the 2001 system all you really have is Power(fuses), 4x4 control module, and shift motor, so............
Need a 7mm socket to remove it I think
2001-2005 Rangers, Mazda B-series and explorer 4x4s used the same module, not engine specific
Wrecking yards are best source but............make sure it is warrantied, lol, wrecked vehicles get fried electrics often
Try this part number: 1L54-7H417