repair an out-of-warranty Thunderbolt port
For that Mac, the thunderbolt port is a part of the motherboard (on the left, 3rd from the top): 

So unless you're able to source the parts, perform a package exchange that clearly is a machine solder and then test things, the most economical repair would be to exchange the whole motherboard. As long as there is no physical damage inside, this would be a flat rate repair ($280) for Apple and probably cheaper than buying a logic board used. The flat rate repair would fix anything else wrong with the Mac. But, if you're up to reflow that part and do advanced soldering - there are lots of people that can attempt this repair even though it's not a trivial one.