Different thread where a truck was totalled when a wheel came off. Truck went to auction but will probably net 25k+.
So yes I think you could get 15-20k with a blown motor if you ship it to car-part or whoever.
@kcjaz might have some ideas for you there as he auctioned his wrecked rig (different thread) which had a good motor but not much else.
Personally I’d fix but my truck has a lot of other mods so it’s not easy to sell and buy another truck in otherwise similar condition. For a bone stock truck, see what else is out there and do the math. I will say though if I was putting a used motor in I’d be very tempted to do a lot of PM beforehand - new gaskets, timing chain cover, timing chain tensioner, valley plate, etc as that stuff is much easier and cheaper to do when the engine is out. But you also run the risk of doing it then finding an issue with the used motor and eating that PM cost