its pretty simple.
Auto parts places sell replacement cables with the number of leads and length you need.
Your truck should be a 4 lead, (2 small, 1 med, and one large), black cable I think 45" will do the trick.
However I chose a different route as I am not to fond of lead battery terminal things, they get weak over time, lose their grip, cables corrode, and the nut strips up the lead making it hard to tighten loosen. So I use Pheonix Gold (car audio shop) battery terminals and build all my own cables using wire and terminal ends from West marine, they have great prices and selection. Everything on my truck is soldered, and dieelectric grease to keep water out. Heat shrink over any splices, and sandpaper to get down to bare metal for any grounds.
Battery cables are a very popular topic on this forum, you might try a search.
There is a strap that goes from your windshield wiper motor bolt to the back of the 4.0L engine as well, this strap is very important for grounding as well as the battery cable.
Even if a cable looks okay outside, it may be toasted inside, so dont let it fool you.
You can replace it for like $10 and an hour of your time.