Are you talking about the switch cover?
The cover is adjustable. You should notch the cover and the case so it has the same alignment before removing the security torx screws. First time I did it I just ground a slot in the screws with a dremel tool instead of going out and buying a bit. Not sure if you have removed the cover yet or just pulled the motor shaft out. The transfer case has an indent that it locks into in the 2WD position. Forget if the shift motor assembly has an indicator it points to. You should be able to hook it back up electrically and the motor will go to the 2WD position before you mount it back. You can also hook the motor to a battery through a brake light bulb in series. This will protect the motor if it goes hard against the internal stop and verify the motor is free enough. If it wont turn with the lamp in series with 12V, it won't be reliable in the car.