What if the research was failure?
It is useful to think of a thesis as answering a question. In your case that question would be: Are thing A and thing B related?
The setup of your thesis would then be:
You introduce the question
You than theorize why they might be related, and why they might not be related.
You summarize previous research on thing A and thing B, and their relationship
You describe the design of your approach (or approaches) to answer that question, and what the advantages and disadvantages are compared to what has been done before.
You describe the results.
You conclude by answering the question, in this case thing A and thing B are not related.
You discuss some implications of that finding
You discuss some weaknesses of your approach and potential other designs that might mitigate those weakness (but have other weaknesses of their own).
It is definitely easier to write up, and especially publish, research with a positive finding. But the research is not a failure: You started with a question, and you ended up with an answer. It was not the answer you expected, but if you knew the answer before starting the research, then why do the research? So, this is not the end of your PhD.
This is one where the voyage is more important than the destination. You might still be able to produce a thesis if you can organize in a systematic manner the various ways which proved to be unsuccessful.
It could also be extremely useful to identify further avenues which have not been explored due to lack of time. If you can somehow prove there is no link that would be actually a positive result.
Finally, it takes skill to publish a negative result but this is far from unprecedented. Again, explaining in a systematic way how you proceed and where you reached a cul-de-sac is actually quite valuable as it will prevent others from following the same path.