The knuckle, rivet and spring just need to be replaced.
Cut off the head of the old rivet with a pair of diagonal pliers and pull the shank out with a needle nose pliers. Discard the old parts.
You need a 480-8 knuckle, TC-23 knuckle pin (rivet), and 480-16 knuckle spring available from The Train Tender.
Getting the spring in place properly will be a challenge, but once all parts are in place, a light squeeze at the very bottom of the rivet with a pliers will keep all in place. Do not squeeze too hard, or the knuckle will not pivot on the rivet and you will need to install another rivet.
Larry