There are two issues here;
The clutch burning smell is because it was slipping. This is because it is either wearing out or you were riding the clutch pedal.
The transfer box has a chain in it that has a oil pump tensioner. The horrendous noise you were hearing under the truck when in 4WD would be this chain slipping rattling over the sprockets.
When you were struggling to disengage 4wd did you try revering? Another trick is to jack up a wheel to allow the tension to release.
Regarding the clutch, you need to use it like an on/off switch when off road and as much as you can when towing to prevent any possible slip. If you are confident that you were not riding the clutch pedal (to give a smoother drive) the chances are the clutch is wearing out and it's time to think of a replacement clutch and flywheel.
Regarding the transfer box, check it's oil level. If that is fine, it might be the chain in it has stretched, killing the sprockets as well. It might be cheaper to fit a used transfer box than trying to fix the one on the truck.
Sorry, I'm sure it's not what you wanted to hear.