(TL; DR - cut your losses.)
It's really a question that you need to answer for yourself. I reviewed your earlier posts, and saw you got the vehicle with the knowledge it had a bad trans - and even what the problem with it was. Most people who show up here have no idea what their trans issues mean as far as cost to fix, etc.
So...if you fix it, here's what you have:
$1600 out of pocket, with a trans that should last 100K - 200K miles, depending on how you take care of it. (If your buddy fixes for $1200, including removal / reinstallation, you owe him a very nice steak dinner, at the very least)
- Installed in a truck that has 200K miles on it now, with no knowledge of its mechanical history, but based on what you've told us, doesn't look promising (and one reason why you got the truck for $500).
- The 4wd is out, and we haven't even started on what could be wrong with that - could be $20 to fix - or $2000. You could remove the system (with work), or if it's working in 2wd, just leave as-is (but you'll be staring at the 'service 4WD' light forevermore.) How important is that to you?
- I can tell the keyless entry is bugging you, and will probably continue to do so untill / unless you get it fixed. Expect more things to crop up like this; while many of us here love our TBs and Envoys, etc. - we know these trucks don't have a reputation for being bulletproof. They can live long lives, but that requires maintenance, and either an aptitude for doing said maintenance, or a fat wallet to pay people to do it. Which is the more realistic scenario for you?
Finally, let's go over the possibilities... keep / fix, sell or part out, or do nothing.
The first, we went over.
The last is not feasible, because the truck can't be driven, currently (unless you see a future for it as a lawn ornament...)
That leaves the second. Sell or part it out.
What could you expect to get for it?
In it's current condition...maybe $500, to someone who wanted a project, and ready to do some work & spend some cash to make it roadworthy. In the case of your truck, that means $2000, for starters, and 200,000 mi on the clock, with an unknown history. It's also 15 MY old (same as mine.)
If you fix the trans and sell it, you can expect...about $500, to be honest. Everything above still applies.
If you sell to the junkyard - that depends on your area. If you live in Chicago metro, Victory Auto will give you perhaps $150 for it, and they'll come over with a flatbed & pick it up (ask me how I know)
Parting it out
could eventually net you a profit on the investment, but you have to wait for the buyers. Can you spare the room? Do you have a homeowners' association to deal with? It takes time to be a one man / one vehicle junkyard.
So...at the end of a long note (hope you enjoyed reading!)... if it were me, with the above knowledge in hand... I'd probably cut my losses. You may not like hearing that - but, to me, that would be the pragmatic choice, with the info you've given us.