In episode 10 of season 2 we witness the encounter between one of the Night King's "officer" and Samwell Tarly.
However, since then, Samwell had time to make it back to the wall, meet Gilly and her child, leave the night's watch, travel it to the Citadel, study to become a Maester, leave the citadel etc.
Now, even after all this time, we see in episode 6 of season 7 that the army of the dead has not even reached the wall yet. Considering the fact that the army of the dead is made out of undeads who don't need (or at least I don't think so) to frequently stop to eat or rest, I was wondering how they haven't made it to the wall yet.
I thought that they maybe could've been retained from heading to the wall by the some of the 3 eyed raven's magic, but even then, Bran had the time to make it back to the wall by being pulled by a young girl on a sled.
I feel like I am completely missing out on some basic plot hole and that this question is actually super easy to explain but unfortunately, I truly cannot recall any events that could explain this.
Edit: Regarding the accusations of this question being a duplicate of (Why is the Night King so slow?). From what I understood, that other question was addressing more precisely why the night king ACTS as slow as he does, notably in ep6 of season 7 when he attacks Viserion. My question is more looking at why it took the night king more or less 5 seasons for him to reach the wall while Samwell did it in barely 1. I researched before posting this question and unfortunately that other question did not answer at all what I am asking here...