Possible reason for denial
It is entirely possible, as happens startlingly frequently (based on anecdotal evidence), that the real reason you were denied was an illegal reason which nobody will state since that would allow you to sue the company, so instead you get the best false excuse they can muster.
If you have some protected status or taboo quality which can be known by others when they look at you or talk to you, then this might be likely. If you look foreign, homosexual, religious, female, old, etc., or if any of these (or other) qualities can be understood from what you say, and if you are in any area where bigotry against this is high, then it is understandable - though troubling, often shameful, and regrettable.
Anecdote
I once came in for a final interview which was with the CTO of a mid-to-large organization. I made the mistake of saying something that gave away some knowledge about me that some people dislike, but it was something that is protected by law here. I knew people who worked at that place who all but 100% confirmed for me that the real reason I wasn't chosen was illegal, and that didn't surprise me. In fact, this has happened not once, but twice, where I knew from good quality inside information that the hiring manager wanted to hire me but was refused from higher up with no official reason but with suggestions as to the illegal nature of the decision.
If you do fall into this category, don't make the mistake of assuming that everyone is a bigot. Sometimes you just don't get chosen for normal reasons. But sometimes it's not so innocent. For the times when it is obvious that this is happening, it is so extremely difficult to prove that it is not worth it to fight that battle legally.
"Is there any way to fix this?"
If this is your problem, unfortunately there might not be a way to fix this. If you suspect this is your problem, you could try minimizing or removing whatever it is that gives away your status. I noticed that when I changed something about myself which gave away one of my important life choices, people immediately started treating me differently, and not just interviewers but friends and family too. A few years later when I removed that change so that I no longer gave that information away, people - including interviewers - started treating me better again.
So if you wear a rainbow pin, a tie with the Mexican flag on it, or if you wear a religious garment, have grey or white hair that can be dyed, or any other little thing that makes a protected status known, no matter how small and non-imposing you might think it is (and even more if it is large and imposing), you can probably "fix" this by removing this and looking more normal. Quotes around "fix" because I use that term very loosely.
This is a big choice to make. People should not have to change this just to be accepted, and it is depressing to face this when the issue is important to you. But, to add to my anecdotes, when I changed myself to appear more normal I very quickly started receiving more positive responses from interviews and more job offers. When I was myself, I struggled to get dead-beat employers who were offering way, way, way lowballed salaries to so much as acknowledge me and I got 0 offers from many interviews... but once I suppressed myself (ie: No longer wore my choice on my sleeve) I started getting job offers that were reasonable - and was even able to turn some offers down that I would nearly have begged for before.
So give it a lot of thought, as it is not something to take lightly. Choose if accepting bigotry and denying yourself is worth it. I was depressed for a while, but it becomes much easier to deal with in time.
And, alas: If your real reason for being denied fits into my description above but there is nothing you can do about it, such as if you look foreign and live in an area with much racism, then I am very sorry that my answer will not work for you.