Tough call. You neglected to keep up with repairs for however long. Now aside from a list of needed repairs, you have a critical repair that must be done to get any value out of the truck either as transportation or to sell. Otherwise it isn’t worth squat , not running.
Best case you spend whatever getting it running and then whatever you can sell it for plus $5k. The truck you can buy with a theoretical $10k is not going to have less miles than yours if it’s a diesel and in any sort of decent condition.
Look at your needs. If you need a diesel, (you don’t if an old low power 7.3 does what you need) then you need budget, skills or luck to find something within budget that is not a pit.
IMO get it running, get what you can for it and find a newer gasser or if you feel the rest of your truck is in good shape, spend the minimum to keep it going.
And don’t use a dealership unless you want to spend more than you have to.
Good luck. At some point you gotta spend money to have a vehicle and your time has come.
Dunno how nice your truck is or what your wants or needs are so tough call on the internet