Ever since Jon learned about his Targaryen heritage, Game of Thrones season 8 has been careening towards a showdown - one that finally came in the season finale, with Jon killing Daenerys and putting an end to her brief reign as the Mad Queen. This ends the reign of the Targaryens completely, since Jon was the last of that bloodline and his punishment for his crime of becoming the Queenslayer was to take the black (again) and head north to the Wall... and beyond.
Game of Thrones season 8 repeatedly made two things clear: that Jon didn't have any desire to sit on the Iron Throne himself, and that he was completely devoted to Daenerys as his Queen. Even after the discovery that his lover was actually his aunt quelled Jon's desire to be anything more than Daenerys' subject, he still remained loyal to her. Jon might even have been able to forgive Daenerys for her horrific massacre of the people of King's Landing, but when she revealed her plans to "free" the rest of the world in the same manner, he was left with a hard choice. Either he could continue to support Daenerys' reign, and be complicit in her crimes, or he could use their close relationship as a means to put an end to the Mad Queen.
Ultimately, Jon chose the latter option - urged not only by Arya, but also by Tyrion, who warned that Daenerys would kill his entire family when they inevitably got in her way. While Daenerys' guard was down, Jon stabbed her with his dagger, putting an end to her life. Daenerys' body was carried away by Drogon, and Jon prepared to accept whatever punishment was handed to him for killing the Queen of Westeros.
Daenerys' abrupt transformation into the Mad Queen in season 8's penultimate episode, "The Bells," was perhaps the most controversial moment in Game of Thrones history. In the season finale, "The Iron Throne," Daenerys showed little remorse for slaughtering thousands of helpless civilians, arguing that Cersei had been trying to use their innocence as a weapon against her. With King's Landing conquered, her next step was to have Tyrion imprisoned for the treason of releasing Jaime. Facing execution, Tyrion pleaded with Jon to kill Daenerys, explaining that her belief in her own grand destiny would enable her to justify any manner of horrors required to reach it.
Confronting Daenerys in what was left of the throne room, Jon made one last effort to plead with her for mercy - not only for Tyrion, but for everyone else. When it was clear that she was beyond being held back, however, Jon did almost exactly what Jaime had done two decades prior: killed his monarch in the hope of saving the people. As with Jon heading back to the Wall, this brings Game of Thrones' story full circle: it all began with a Targaryen being slain by one of their most trusted allies, and that's how it ended as well.