Another place to check is the metal "P" clip that sits top the transfer case, the wiring loom that runs through it which is covered in a foil type sheath can wear away & as mine did I had 2 wires cut. Same circumstances, would sometimes come on then eventually got worse.
The loom is relatively easy to remove & then resolver & fix.
HTH
Cheers.