Melisandre pulls some shenanigans and switches them before Mance was burned. It was muddled as shit in the books and was just as well left out since it probably wasn't going anywhere anyway.
A Dance with Dragons
Jon Snow, now Lord Commander of the Night's Watch, hears rumors that Stannis Baratheon intends to grant lands and castles to Rattleshirt and Sigorn.[11] Stannis and his red priestess, Melisandre, execute Mance for desertion from the Night's Watch and for trying to destroy the Wall with the Horn of Joramun.[4] Before and while being burned in a cage, Mance denies being King-Beyond-the-Wall. Jon has his archers kill Mance to end his suffering.[4]
After the Lord of Bones submits to Stannis,[4] Melisandre controls the wildling raider with a magical ruby on his wrist.[12]Stannis assigns him to serve the Lord Commander,[12] and Rattleshirt surprisingly defeats Jon in a sparring session.[13]Melisandre later tasks Rattleshirt with rescuing a girl she believes to be Jon's sister, Arya Stark. Jon is shocked to learn that Melisandre glamored Mance and Rattleshirt to each appear as the other, with the Lord of Bones actually the man burned in Melisandre's cage.[14] Now using the name Abel, Mance travels with spearwives to rescue Arya from Ramsay Bolton at Winterfell.[15]