Fans already know the HBO show took some liberties with the source material. Jon Snow has already been illegally declared King in the North once on the show when he is technically (as far as anyone knows) a bastard. Hordes of angry men waving swords can probably do as they like. None of this has happened yet in the books, where we are all still waiting for the official big reveal about his parentage. But if and when that comes, it leaves the huge problem that he is STILL not the heir to the Iron Throne. Then what?
However, Jon has one major factor in his favour.
The entire Targaryen rule across three centuries was riven with numerous conflicts, uprisings and even wars over who was the rightful heir.
In most cases, it usually came down to who those with the greatest power preferred.
The aforementioned Queen Rhaenyra was dethroned after a major conflict which became known as the Dance of Dragons. After that, any male Targaryen was seen as having a stronger claim to the throne than a female, whatever the order of birth or whoever the king had named his heir.
Technically, Daenerys might have a slightly stronger claim, but the chances of her ever holding a throne ruled by 17 male Targaryens in succession, are slim if a male option remains.
Jon Snow, apparently, inspires loyalty and devotion in most who come across him. Add in the trigger revelation of his true non-bastard Stark blood and the enticing Targaryen lineage and he would be impossible for Daenerys to supplant.
That is her great tragedy. Even if she were still proved to be the legal heir, poor Daenerys would never have had the chance to sit on the throne without burning a hellish path to it.
Of course, as we now know all of this becomes moot when Daenerys indeed takes that shocking path to self-destruction, but it will still be fascinating to see how it plays out in the books.