It could be any number of things but here's a nice overview of how the system works, which may inspire you to test out the various components:
The four wheel drive system is an electronic shift 4X4 system that allows the operator to choose between three different modes. The operator can switch 4X4 HIGH modes at any speed. To engage or disengage 4X4 LOW the vehicle speed must be less than 5 kph (3 mph), the brake depressed, and the transmission must be in NEUTRAL.
The shift motor sense plate, an integral part of the electronic shift motor, informs the Generic Electronic Module (GEM) of the transfer case shift motor and contact plates A, B, C and D position.
The digital Transmission Range (TR) sensor is located on the LH side of the transmission, and informs the GEM when the transmission is in the NEUTRAL position.
The electronic shift motor is mounted externally at the rear of the transfer case. It drives a rotary cam which moves the mode fork and range fork within the transfer case between the 4X4 HIGH, 4X4 LOW and 2WD range positions.
When the GEM verifies the completion of the transfer case shift from 2WD to 4X4 HIGH (reading the contact plate positions), the GEM will then energize both Pulse Vacuum Hublock (PVH) solenoids (supplying ground for 45 seconds). The PVH solenoid will allow a HIGH flow of intake manifold vacuum to the "wheel end hublocks ", engaging the wheel end hubs to the front differential and transfer case to achieve four wheel drive.
When the GEM verifies the completion of the transfer case shift from 4X4 HIGH to 2WD (reading the contact plate positions), the GEM will then energize only one (low vacuum solenoid) of the PVH solenoids (supplying a ground for 10 seconds). The PVH solenoid will allow a "LOW" flow of intake manifold vacuum to the wheel end vacuum hublocks, disengaging the wheel end hubs from the frontdifferential and transfer case to achieve two wheel drive.
The 4X4 shift motor uses a module containing two relays which, under control of the GEM, shifts the transfer case shift motor between 4X4 HIGH, 4X4 LOW and 2WD modes.