As Game of Thrones closes in on its HBO ending, the series is far from over in the novels. Back in Season 7, the show moved beyond the book material — particularly for Jon Snow's story. In the Game of Thrones books, what happens to Jon Snow is very different from where the show is now.
In the early seasons, the show mostly tracked with what happens in the books. Jon Snow was a bastard, he found a bunch of direwolf pups, he joined the Night's Watch. In the books, he initially wasn't quite as committed to the Watch, though. In A Game of Thrones he tried to desert to go to Robb's aid following Ned Stark's death. Because the punishment for leaving the Watch was death, Jon's friends wouldn't let him leave and he stayed at Castle Black. But his attempting to leave is a pretty big character difference to the show version of Jon Snow who is all Night's Watch loyalty, all the time.
Another big departure from the show is that, in A Storm of Swords, Robb decided to legitimize Jon so he could be the heir to Winterfell. Robb did this because he thought Bran, Rickon, and Arya were all dead, and Robb was leading an army and not able to oversee the Stark home.
The final book that Jon is in is A Dance With Dragons. And, as of his last scene in the book, he's dead (or nearly dead.) Like on the show, in the books Jon is stabbed in a Night's Watch mutiny. In the novel, he had planned to go attack the Boltons and, even though he didn't require the Night's Watch to go with him, they were all like "that's not what we do here, bro." They tried to kill him to protect the honor of the Watch, which is very clear that it doesn't interfere in Westerosi political business.
On the show, in Season 6, Jon is also stabbed and it's very clear that he dies from his wounds. (Melisandre brings him back to life in Season 7.) It could be argued, though, that Jon isn't dead in the books. The final line regarding his fate is just, "When the third dagger took him between the shoulder blades, he gave a grunt and fell face-first into the snow. He never felt the fourth knife. Only the cold."
Maybe that means he's dead, and maybe he's just severely injured. It's hard to tell because George R. R. Martin has not released any more books since then. Jon doesn't even appear in the sample chapters from The Winds of Winter. So that is where the books leave Jon — possibly dead and about two seasons behind in terms of where the show is now. The books haven't even confirmed Jon's Targaryen parentage yet.
Basically, if you want to know what happens to Jon in the Season 8 finale, the only way to do so is to watch the episode. The books have long ago been left behind. So, Mad Queen to contend with or not, Jon is in a much better spot in the TV series now than he is currently in the books.