The Bible is silent on their point of origin. Most scholars assume that they were from Persia. They might well have travelled close to 1,000 miles or 1,500 Km. If that assumption is correct we must assume that, even if they themeselves didn't walk, most of their bodyguard and retinue would have been on foot. They would have been travelling at the pace of the slowest member of the caravan. If they managed a respectable 40mi./60km per day, they would have had to travel for 25-30 days to get to Bethlehem. If they made any more extensive stops en route it would, of course, have taken them longer.
I hope you have found this helpful.
God bless,
Mike