If you have this connector on the chain coming out of the hub, you have an SRAM 3-speed hub.
https://postimg.org/image/oseo1due3/ SRAM ceased production of hubs in early 2017 and parts are becoming much harder to obtain. Check the threads on the end of the rod. If they are stripped, buy another rod. You can still get them from this store
https://clevercycles.com/catalogsear...hain+indicator. If the problem is within the hub, you are in a much more difficult situation. You might have stripped the part that connects to the rod and that would require disassembling the hub. When I had a 3X8 SRAM dual-drive hub fail I tried finding a place to replace the bearing retainers inside it. I was quoted the cost of a new hub to simply replace two bearing sets by a shop that specializes in hub repair in Washington state. BTW,
SRAM has always sucked when it comes to replacement parts. Even a major bike shop I once worked in was unable to pry the parts out of the SRAM distributor for an entire year of trying.