its probably the switch, but i have 208,000 on my 99 5.3 Z71 and the service 4wd light comes on once every couple of months. I just restart the truck and it stays away. Never had any problems getting into 4wd either.
My 2004 Avalanche did that at 20,000klm. I dont remember what fuse to pull in the engine compartment ,,but pulled it and let it sit for 1/2 hour,then put the fuse back in. Was ok for a couple weeks then it happened again.Brought it to GM and had to reflash the ecu. They said it was water or some crap. My friend who works in the back said they all are comming in for the same thing.