Depends on what route you go, a good transmission shop can give you a good deal on rebuilding your transmission. Or you can just buy a remanufactured unit which often comes with a good warranty; or you can get a junkyard transmission, they don't always have warranties on those. Or if you really want you might be able to get a brand new unit (usually for older transmissions its just a factory rebuilt unit done at a Toyota factory rather than a 3rd party company is all.)
Either way you're looking at a few thousand dollars in parts and labor.
Is this a stock 4Runner? If you're doing some hard towing/off-roading, have a lot of extra weight with mods maybe you can search for some "upgraded" transmission kits? I remember Skyline mentioning a company that made a set of beefier internals and a different valvebody for the transmissions.