Here are links to pictures of the transfer case encoder motor I dissected on my '06 GMC Envoy. Hopefully this will inspire someone to figure out how to repair this part. The motor turns just fine. Somehow it is not providing feedback to the computer.
Quadruple-reduction planetary gear set
A GMC dealer took me for a ride on this one. The price for the motor assembly - GM Part number 89059275 - was over $500. I've seen this part on EBay for under $200. Also, they screwed me on labor. My warranty company allows 30 minutes to diagnose the issue, and the dealer wanted (and got - I tried to negotiate with them) an hour. Needless to say, I'm finished doing business with GM dealers, and likely GM.
My Envoy is a nice truck, but I have not been satisfied with the tech support and customer service provided by GM and the three dealers I've used for service.
-- Dan Meyer