In terms of actually getting Jon power and ending with him sitting on the Iron Throne, it plays the role of making sure Dany doesn't win the Game of Thrones and also rules Jon out as a player. However, it did serve the purpose of turning people against each other.
Jon turns against Dany
Whilst Jon doesn't turn away from her as his queen he does turn away from her as his lover and partner. Before he found it out they had a romantic relationship going on but after Jon rejects her advances and this makes Dany lonelier than she already is. He's one of the last people Dany trusts and him rejecting her is signalling to her, in her mind, that he no longer wants her; even if he does still support her claim.
Varys turns against Dany
With Dany's ever growing "madness" Varys decided her in a leadership position was no longer in the best interest of the people of Westeros. As such he turns against her, plots for her assassination and conspires against her with other Lords. This ultimately leads to his execution which is a direct consequence of his finding out who Jon is.
Dany turns against Tyrion, Varys and Jon
Dany finds out that Varys knows what Jon's real identity is and knows who told him. As such she turns against Tyrion because he knew he told him, and Varys because of that and his actions once knowing that knowledge. She also turns against Jon because she asked him not to tell anyone and he told Sansa. To a certain extent she also turns against Sansa but they were at odds since they met and I think they were always against each other.
Jon turns against Sansa
To some extent again Jon turns against Sansa slightly because she betrayed his trust and told Tyrion about him even though he made her promise not to tell anyone.
Dany turns against everyone
Whilst apparently the final straw for Dany is seeing the Red Keep and it's an in the moment decision to "Burn them all!" it has been building up throughout the series. She's lost everyone that is close to her either physically or mentally and it has been pushing her to the edge. With the reveal of Jon's parentage it pushes more away from her which is a major factor in her turning against everyone.
Jon turns against Dany
As a direct consequence of Dany burning the city because of her "madness" which is in part due to what happened because of Jon's parentage he starts to doubt Dany as his queen. Whilst it is Tyrion who finally convinces him to kill her the doubt was already in his mind, he just did not have the will to act on it. This action then removes Dany as a player and also leads to Jon's arrest and subsequent exile to the Night's Watch which removes him from the game. Had they not found out who he is, he would have stayed loyal to Dany and in a romantic relationship with her. She then probably wouldn't have burned the city which meant he never would have turned on her and they would have ruled "side by side".