I am currently writing my thesis and am quite far already. However, I have discovered a paper now which troubles me quite a bit, as it pretty much destroys everything I am arguing for (and very convincingly so!). I know that this would not be so bad, had the paper been published only recently. But it came out about 10 years ago - I should probably have found & read that much earlier! What am I to do now? I am worried to tell my supervisor!
It's just one paper. Papers in academia conflict quite often, sometimes with reasonable explanation.
What you should do depends a lot on the nature of the conflict. At a minimum, you should address the paper's arguments in your literature review and why you think your dissertation will find different results, or why the paper doesn't apply, or why you think parts of the paper are relevant but other parts are not, or what have you.
If the paper reveals a much more substantial error in your argument, you may have to rework sections of your argument or tweak your approach.
But the discovery of one paper is very unlikely to torpedo an entire dissertation project.
It had happened to me while I was working on my masters thesis. However, it was not completely the same which I had formulated. But, still people/reviewers might reject all your hard works with the reference (existing old work). However, I didn't stop like that. Because, in this world many things are already done and the existing ones are improved based on some new directions.
So, it is not so late that you have to pack off everything. You could argue or propose in a different way than the existing paper has already. However, please not that you might need to cite the paper which has already been published.