Hi @judessa93 ,
The headphone socket in your model tablet is mounted directly onto the motherboard.
You may need SMD skills and tools to effect a repair or replacement of the socket.
I don’t know if a socket from a different model Samsung tablet would have compatible connections as some are mounted on a different pcb module and connected to the motherboard via a flex cable connection and may have different configurations for the connections.
I’ve been unable to find a replacement socket part for your model tablet. You may have better luck. ;-)
An alternative option if you cannot find a replacement socket (and if you really wish to have a working headphone socket) is to replace the motherboard.
They are available online.
If you decide to resolve your problem this way then here’s a link to the ifixit Samsung Galaxy Tab 4 7.0 Motherboard Replacement guide which may be of some help.