Flashing 4WD lights means the shift motor is not moving
The GEM is connected to the dash switch and the dash lights
The GEM has 5 wires that go to the Round Gear case on the shift motor
These 5 wires are connected to contacts inside the shift motor
Pictures here:
http://www.explorerforum.com/forums/index.php?threads/how-to-rebuild-4x4-shift-motor.123542/
GEM activates two relays in a separate box(shift control module) to send power to the shift motor.
GEM waits for the contacts inside the shift motor to change, open and close, this tells the GEM the motor is working AND what position it is in, 2WD, 4high or 4low
If contacts do not change then GEM flashes the lights to let driver know there is a problem
So either GEM is "lost" can't read contacts, or Relay box is bad
Assuming you have tested all fuses
The fact GEM flashes the lights usually means GEM is OK, usually is the operative word
Money would be on shift control module(relay box), if shift motor tests as OK