The 4WD error light can be illuminated when the system detects a fault within the four-wheel drive system.
It can be due to few different reasons.
It can be a faulty transfer case shift module, bad switch, inoperative transfer case, it can also be due to a wiring issue.
I have included the wiring schematics for your reference.
Repair Safety Notice: This information is for general instructional purposes only. Vehicle repair can be dangerous. Verify all information, follow manufacturer service procedures, use proper tools and safety equipment, and consult a qualified repair shop when needed.