In Game of Thrones season 5 episode 10, Jon sends Samwell Tarly to the Citadel in Oldtown to train as a maester so as to become maester Aemon's successor.
In season 7 episode 5, Sam decides to leave Oldtown, apparently without finishing his training; in season 7 episode 7, he ends up in Winterfell.
Since Sam has (1) neither finished his training, (2) nor mentions going back to Castle Black, should Jon, as King of the North, treat him as a deserter of the Night's Watch and behead him, like Eddard Stark beheaded Will in season 1 episode 1?
Update 1: Since some people claim that Sam's primary task is to learn about the White Walkers, I would like to point out the following:
- In season 5 episode 10, Sam says to Jon, "Send me, Gilly and the baby to Oldtown so I can become a maester. That's what I'm meant to be, not this." He then adds, "I'd be more use to you as a maester. More use to everyone now measter Aemon's gone. The Citadel has the world's greatest library. I'll learn about history, strategy, healing, and other things, things that will help - when they come." Dragonglass and Valyrian steel are mentioned just before these words are spoken but they are not stated as reasons for going to the Citadel.
- When he arrives at the Citadel, Sam says, "I am to be the new maester." Quitting before the end of his training means he does not fulfil part of his task.
Update 2: Since some people correctly pointed out that Winterfell is on the way to Castle Black, I'd like to point out what Sam says to Bran when Bran asks why he came to Winterfell: "Jon is the one to lead the fight against the dead. I know he is. And he can't do it alone. So I've come here to help him." This at least suggests that he wants to stay at Winterfell, rather than travelling back to Castle Black.