There have been a couple of D40 owners reporting problems with their transfer case servo motors. That'd do it in a heartbeat. But D22 ... shouldn't be a problem with the transfer case at all, because it's all manual.
So back to basics. Car in neutral, foot on brake, change to 4HI - any good? Are your brake lights coming on when you press the brake? (that's important)
Could be a neutral position sensor/switch, brake switch ... it's not a common thing.