I have a 92 jimmy s-15 4wd with elctronic dash switch. I had all sorts of trouble getting it to shift into 4wd. Bad rocker switch, bad module, and ultimately a bad encoder motor. Now it works fine everytime.
I was told by the tranny shop that up to 98, both Ford and GM used this encoder motor for electronic switching and the encoder motor almost always went out.
I tried via the internet, and word of mouth, to find a new encoder motor without going to the GM dealer, but found nothing other than a few used ones that ended up being junk, even though they were guaranteed.
So I ended up getting one from the dealer at the cost of somewhere around $425. As far as I could find out its the only place to find a reliable one unless you get lucky.
Mike