I had the same problem with my 2004 GMC Sierra 4x4. THe GM Dealer would have charged me a fortune to replace parts so I wne to a local electronics guy close to where I live and he fixed it in 10 minutes. Turned out, the problem was the dash selector switch (Auto, 2H, 4H, 4L) on the left hand side of the gauge cluster. He removed the switch and opened the back and found the soder connections were broken off and he just resodered them. When he popped the swich back in the dash and I tested the selector switch settings, it all worked like new and the Service 4WD message in the DIC (above the steering column) was gone (the odometer reading showed as normal).
He fixed my radio as well and charged my $80 for the whole visit.
Lesson learned - STAY AWAY FROM STUPID GM DEALERS WHO HAVEN'T GOT A FRICKEN CLUE HOW TO SERVICE GM VEHICLES...
Hope this helps...You problem may be the same cause as mine was.