The center differential light on the dash in the center of the 4WD light doubles as a malfunction light for when a problem is detected in the 4WD system.
While the causes for the light to come on are many, this will nearly always be the result of a bad free wheel clutch solenoid pack or the vacuum lines to it having an issue. To say it is common on these trucks would be a massive understatement. In your instance you have even further evidence as you are hearing occasional grinding and clunk noise which is another trait of the freewheel system malfunctioning as the front axle will partially engage as system vacuum fluctuates.
To verify 100% you can get the system scanned of course to tell what fault code is set, but honestly this is so common I would go forward with checking the free wheel system as you are likely to find an issue there anyway and you can forego the system scan.
Go over all of the vacuum lines under the bonnet, paying particular attention to the ones by the free wheel solenoid and where they lead back to the firewall as well as lines on the top of the engine.
If no problems are found with the hoses (rotted, fallen off, etc), then direct your focus to the free wheel clutch solenoid pack. It is the pair of solenoids bolted together on the frame rail beneath the air filter box. Take a photo of the unit before removal so that the hoses can be reconnected the same, then remove the solenoid pack for testing.
Resistance testing of the solenoid coils should be around 35 ohms (+/- 15% or so for temperature variation). If either is significantly out of range, replace the solenoid pack.
For operational check, use a hand vacuum pump to draw vacuum across one solenoid at a time while using some scrap wire and either the truck battery or a 9V battery etc to engage/disengage the solenoid. If either solenoid holds vacuum regardless of voltage application or does not hold vacuum regardless of voltage application (even a very small leak down), then replace the solenoid pack.
If nothing is found, then a scan of the system would be in order to see what faults are set... you would need to reproduce the light before bringing it in and not turn the key off until it is scanned. Realistically though.... we really only see vacuum/freewheel solenoid or occasional switch issues on the transfer case, and the switch issues are pretty well contained to 2001-2002 era vehicles.