Got my ranger back last night. Spent an hour riding on roads then through woods and fields. Changed between 2 and 4 wheel on and off with no problems. Maybe the wiring harness was the problem. I plan to spend a lot of time over the next couple weeks making sure it is fixed and not just patched. So far so good. Thanks for everyones help.