It all depends a lot on the axle ratio. 4:10 rear is gonna tow a lot more than a 3:55 rear etc. As you said the max towing
capacity for the second gen with the 5.9 CTD and 4:10 gearing is 13,000 lbs and a GVWR of 20,000 lbs. So even if you
could beef up the drive train by swapping to say 4:56 or lower gears and increase oil and cooling capacity, as well as
transmission cooling capacity to handle pulling 20,000lbs you would still have two other problems.
Assuming you would be pulling a gooseneck trailer which have approximately a 25% tongue weight in the bed, you would
be loading your truck with about 5,000lbs of payload, not counting driver passenger etc which would likely put you somewhere
around 5,500 lbs or better. The max payload for a second gen 5.9 that I found was 4,510 lbs so you would be way over this as
well, you could maybe beef up the suspension, add air bags etc.
The bottom line is even if you beefed up all items stated above, which would be expensive, you still have the most important consideration, the crappy second generation tyranny's that have a very high failure rate even when used conservatively, try
towing 20K with it and I would bet the tranny will certainly fail or be badly wounded from the endeavor.
And lets not forget that you would be exceeding all the trucks specifications by huge margins in the event you were pulled over
by law enforcement or DOT. Heck you would be at least 6,000 lbs over your rated GVWR, 2,000 lbs plus over your payload capacity
and 7,000 lbs over your factory rated towing capacity. The fines for exceeding these vary from state to state but can be quite steep
and are usually assessed by the pound.
Your too far off the mark with that truck, you need a new plan.