Messenger Muhammad (p.b.u.h.) had forbidden women to travel alone in his time, but he also told that a time will come when there will be peace and security in the roads and women will be traveling alone great distances.
Narrated ‘Adiyy bin Hatim: “While I was in the city of the Prophet, a man came and complained to him (the Prophet, ) of destitution and poverty. Then another man came and complained of robbery (by highwaymen). The Prophet said, “Adiyy! Have you been to Al-Hira?” I said, “I haven’t been to it, but I was informed about it.” He said, “If you should live for a long time, you will certainly see that a lady in a Howdah traveling from Al-Hira will (safely reach Mecca and) perform the Tawaf of the Ka’ba, fearing none but Allah.” I said to myself, “What will happen to the robbers of the tribe of Tai who have spread evil through out the country?” The Prophet further said. “If you should live long, the treasures of Khosrau will be opened (and taken as spoils).” I asked, “You mean Khosrau, son of Hurmuz?” He said, “Khosrau, son of Hurmuz; and if you should live long, you will see that one will carry a handful of gold or silver and go out looking for a person to accept it from him, but will find none to accept it from him. And any of you, when meeting Allah, will meet Him without needing an interpreter between him and Allah to interpret for him, and Allah will say to him: ‘Didn’t I send a messenger to teach you?’ He will say: ‘Yes.’ Allah will say: ‘Didn’t I give you wealth and do you favors?’ He will say: ‘Yes.’ Then he will look to his right and see nothing but Hell, and look to his left and see nothing but Hell.” ‘Adi further said: I heard the Prophet saying, “Save yourself from the (Hell) Fire even with half a date (to be given in charity) and if you do not find a half date, then with a good pleasant word.” ‘Adi added: (later on) I saw a lady in a Howdah traveling from Al-Hira till she performed the Tawaf of the Ka’ba, fearing none but Allah. And I was one of those who opened (conquered) the treasures of Khosrau, son of Hurmuz. If you should live long, you will see what the Prophet Abu-l-Qasim had said: ‘A person will come out with a handful. of gold.” (Bukhari, Manaqib,793)
We are now living in that time. So, as long as the roads are safe, women can travel to hajj, umrah or any other place alone.