A hadith like this has been narrated by A'mash with the same chain of transmitters.
Sahih Muslim Book 15, Hadith 475
← Previous Hadith
It is not lawful for a woman believing in Allah and the Hereafter to undertake journey extending over three days or more, except when she is in the company of her father, or her son, or her husband, or her brother, or any other Mahram.
Sahih Muslim Book 15, Hadith 474 Next Hadith → I heard Allah's Messenger (ﷺ) delivering a sermon and making this observation:" No person should be alone with a woman except when there is a Mahram with her, and the woman should not undertake journey except with a Mahram." A person stood up and said: Allah's Messenger, my wife has set out for pilgrimage, whereas I am enlisted to fight in such and such battle, whereupon he said:" You go and perform Hajj with your wife."
Sahih Muslim Book 15, Hadith 476
Sahih Muslim Book 15, Hadith 474 Next Hadith → I heard Allah's Messenger (ﷺ) delivering a sermon and making this observation:" No person should be alone with a woman except when there is a Mahram with her, and the woman should not undertake journey except with a Mahram." A person stood up and said: Allah's Messenger, my wife has set out for pilgrimage, whereas I am enlisted to fight in such and such battle, whereupon he said:" You go and perform Hajj with your wife."
Sahih Muslim Book 15, Hadith 476