I know there's probably a handful of threads on tailgate window fixes and the safety switch bypass on here or the other FSJ site. I may have actually done a thread on the other site when I did mine way back when. Can't remember. Search on "FSJ tailgate safety switch" online in general and you're sure to find it.
The switch cut power to the motor when the tailgate isn't closed, it's up near the latch on the drivers side IIRC, been a long time now. Reason for the switch is that the glass is heavy enough that it can break off if opened when gate is down, so if you bypass it, you just have to be safe Once the switch goes, you can't get any power to the motor at all and the window is down or up until you fix it. Everyone assumes a bad motor (and it could be.)
If your glass is down (suck!) disconnect the lift mechanism from the glass through the access hole (have new clips ready, old ones may never work again), put the gate up enough to grab the glass without it being too horizontal (have help), take the glass out very carefully and set aside, then work on the guts. Fix everything electrically, lube everything including the guides on the sides, and reinstall the glass with the switch bypassed (if that's the issue). Replacing the rubber wipe can do wonders too, if it's all hard and brittle and still touching the glass, it can make it hard to go up and down.
Pull and test the safety switch. If it's bad, you're probably near done. Bypass it and move to cleaning/lubricating. If you find a bad motor (I jump power to it directly to test it by itself), you can just put the tailgate back together until you get a replacement, if the glass was down, it's no different. With no action from either the dash or key switch, it's almost certainly either the motor or switch or the wiring between the two. Doubt both switches are bad, but it's easy to test with an ohmmeter.
I'm coming into an insane time for work and travel through the end of the year, but might be able to help sometime...