Do you have the Auto-trac or Control-Trac system? Auto-Trac has a "Auto 4wd" button.
The front axle is engaged via an electric vacuum switch. On an Auto-Trac equipped Blazer like mine (2000) the vacuum switch is mounted on middle of the firewall. To troubleshool disconnect the vacuum line on each side and splice them together, the front axle should engage and the 4wd light on the dash should be steady. The switch is ~$70 at the dealer. I believe the vacuum switch is mounted on the transfer case on Control-Trac equipped Blazers. Check the vacuum lines also, mine were rotted at the the switch connections.
Another thing to check is the vacuum actuator located beneath the battery tray. It's a roundish ball with linkage to engage the front axle.
The Transfer Case Control Module (TCCM) is located in the right front kick panel. According to a GM mechanic I know,the TCCM locks up occasionally and has to be reset. The kick panel can be removed and the TCCM disconnected or I would disconnect the battery to reset it. This was my preferred method when the transfer case would act up. Engaging 4wd for a short distance every week or two kept my TCCM from locking up.
I can't help you with the transfer case control motor or the transfer case itself.
Here's a link that helped when I was troubleshooting my Blazer.
Post back and let us know how you made out.