Welcome TackledMirror14,
It sounds like your iPod classic 5th gen shows that headphones are connected, when they are not. We'll do our best to assist.
First, we'd try plugging in a pair of headphones and then removing them a few times to see if it will register that the headphones are no longer connected.
If that doesn't work, then you can try cleaning the iPod classic using these steps: How to clean your Apple products
iPod classic
To clean iPod classic, unplug all cables, turn iPod classic off, and slide the Hold switch to HOLD. Then use a soft, slightly damp, lint-free cloth. Avoid getting moisture in openings. Don't use window cleaners, household cleaners, compressed air, aerosol sprays, solvents, ammonia, abrasives, or cleaners containing hydrogen peroxide to clean iPod classic.
Then try force restarting it: Learn how to force restart your iPod
Force restart your iPod classic
1. Put the Hold switch firmly in the unlocked position.
2. Press and hold the Menu and Center (or Select) buttons for 8 seconds, or until you see the Apple logo.
Still need help?
Set your iPod on a desk or table and try again. This time, when you press the Center button, don't touch the Click Wheel. And when you press the Menu button, press it near the outside of the Click Wheel instead of near the center.
Should it persist, does the headphone port stick out of the iPod classic? It kind of appears that way in the photo. What steps have you tried prior to posting? So we don't repeat those steps.
Hoping to hear back, take care.