Yeah. That.
And also there is a symmetry to the two bastards (as far as everyone is concerned Jon is still Neds bastard, for now) of the best friends who won the last war standing together in this one. The hammer Gendry chooses is significant. Robert Baratheon was famous for his use of the War Hammer.Not sword. They right now have more in common than anyone Jon comes in contact with. He may find that comforting. Someone his age, the bastard son of a highborn dropped into the craziness of worlds they didnt belong in.
Also, because of the symmetry and symbolism, I have Gendry as a decent chance wild card to end up on the iron throne too. He has a legitimate claim being the only known Baratheon son, and I can see what happened in the past happening again.
Remember Tywins (or was it Jamies?) conversation with Ned Stark in season one? How they were amazed that when Ned was the first one to break into the throne room to signify the end of "Roberts Rebellion" he couldve chosen to sit on the Iron throne himself and become King. But Ned stepped aside and gave it to Robert.
Especially if Dany dies, even when Jon is outed as the rightful heir and a Targaryen, I could totally see him choosing to not be on the throne. There are a million hints to that over the seasons. In every instance leadership is thrust upon Jon and he accepts it grudgingly. He does it out of what he believes to be obligation. Derives NO joy from it. He doesnt like it . Not like say an egomaniac like Sansa does.
If Jon chooses not to sit on the throne, Gendry is the guy.