He was most likely still in Winterfell during the war, when Lord Ned was risking his life. He was just a boy back then and the only heir, there wouldn't have been a Stark in Winterfell otherwise. He most likely joined the black after the war and after Robb was born, for reasons mentioned above.
Then why didn't he fight in the war? I don't think he's so much younger than Ned, like 3-4 years at most. I always assumed it was because he had already joined the NW then, but maybe it was because there always needs to be a Stark in Winterfell?
But even if it went down like you said, he would have still been 3rd in line when he joined the NW. So I still think he left for the Wall only because he wanted to make his own place in the world, not because he was involved with any R+L=J craziness.