To jog your memory (book 4 spoilers ahead): Spoiler Jon Snow ordered Sam to escort Maester Aemon, Gilly and Dalla's baby to the Citadel in order for: a) Maester Aemon to die away from Castle Black, b) Sam to begin his Maester's training, and c) the baby to escape from Melisandre. If you recall, she (Melisandre) wanted to burn Dalla's baby because it was fathered by Mance Rayder and she needed the blood of a king. So, Jon pulled the old switcheroo and gave Gilly's baby to Dalla. Yes, Sam and Gilly had sex on the ship, not at Castle Black. Maester Aemon died on the ship, not at Castle Black. When last we saw Sam, he had just met Pate (whom I suspect is really Jaqen H'ghar) in the tower at the Citadel.