I think Jon technically dies from from the attack at the end of ADWD, but wargs into Ghost before really dying - since he technically dies, that should absolve him from his vows to the Night's Wacth - then Melisandre is able to bring him back, using the same magic for Lady Stoneheart, and he leaves the Watch after being betrayed, becomes legitimized as a Stark and goes with Stannis the Mannis to retake the North and avenge his family
Also, I'm of the mind that he isn't really a bastard and is part Stark and Targaryen so he also has a legitimate claim to the throne - also, since the series is called "A Song of Ice and Fire", I'm inclined to think that the Ice is for Jon and the Fire is for Dany - maybe they'll rule together or be the last two standing - either way, their kids would be gorgeous - and possibly also born of semi-incest (cousins?) if some theories prove to be fact