The light flashing means the 4x4 system sees something out of range and it often times is a speed sensor. To determine which one is is you should start with having the system scanned and the code retrieved.The transfer case speed sensors provide a square wave signal to the GEM indicating drive shaft output speed. If the GEM detects that one sensor is indicating a lower input than the other, it will control a hydraulic clutch inside the transfer case with a stronger duty cycle command signal (on a Brown (BN) wire) to provide more output torque to the front drive shaft.
Inspect the wiring of the front and rear drive shaft speed sensors located on the transfer case for an intermittent open, chafe to ground or connection problem at the transfer case shift motor connection. If the circuits appear to be in good condition, suspect that one or both of the sensors is intermittently failing thereby causing the codes to set.