Deductions & credits

If the 5329 is showing the entire $5000 as 'excess', I suspect that you may have missed answering the questions about having a High Deductible Health Plan and not having other health insurance (such as Medicare) or answered them in a way that disqualified you from the HSA contributions.

If that is the case, and you DID have a High Deductible Health Plan and no other health insurance, when you amend your tax return, it will result in a refund.
<a rel="nofollow" target="_blank" href="https://ttlc.intuit.com/questions/1894381-how-to-amend-change-or-correct-a-return-you-already-filed"...>