1st generation S series trucks are known to have issues with the window/gate latch system.
What exactly is the problem with yours? Is it just the window that won't latch or is it the tailgate? If it's just the window, it may not actually be borken, and if so it's an easy fix....
no..it latches its just that it wont lock...you can just open it and the window will come up then you can turn it the other way and the tailgate will come down
Oh I see. In that case, your lock cylinder probably needs to be replaced. Thats not a part you can pull from a junkyard since you need it to be matched to your keys.
If you do get a new one though, it's not hard to replace. You take off the trim panel from the tailgate, and pull back the plastic. Theres two rods that have clips connecting them to the lock. Take those off, then take off the big clip holding the cylinder onto the tailgate. It will pop right out.