Jon's resurrection was not fruitless, though
Him being alive was essential to the kingdom even standing a chance against the Army of the Dead. He was the one who got the Freefolk south of the wall once Mance was gone, he was the one who took back Winterfell, and he was the one to recruit Dany and all her resources to his cause.
All he cared about was preserving life in the Realm, and he did that undoubtedly. Just because he was heir to the throne and had the skills to rule didn't mean he wanted to or was meant to. Furthermore, even him facing the Night King never meant he was the one to kill him. Never understood why folks kept getting caught up on that. I think that's just what people wanted to see. I honestly thought Bran would be the one to kill him because the NK direct adversary was the 3ER; it was never Jon. Arya landing the death blow to Death incarnate after serving in a death cult doesn't really seem farfetched when you think of it either.
In the end, besides Jon having to live with the stigma of killing Dany, I think he got the happiest ending. He got to go to the True North with the folks who always accepted him from jump. Why did folks think he should have stayed to rule? He stayed having to deal with folks fukkery and kept telling them he didnt want the throne. Ge earned that peace. After the fukkery of Cersei and Dany, Bran/3ER taking the throne made sense to me; him sending Jon north was doing him a kindness and ensuring he didn't have to deal with *southern* issues in his life anymore.
Jon Snow made all of this possible. There is nothing we see past his resurrection I think would have been possible had he stayed dead. He was definitely needed.