What would make my service 4wd light come on on 2002 Chevrolet Trailblazer

Sometimes it won't switch from 4wdauto back to 2wd and the service 4wd light comes on if you turn the vehicle off and start it again it will be fine

Asked by for the 2002 Chevrolet Trailblazer
Check for codes in the transfer case control module and post the code, possible c0306.