The account does not specifically say that Jesus remained in the wilderness throughout the time of the temptations.
Jadi, Yesus bisa saja berjalan kaki ke Yerusalem, meski hal itu mungkin memakan waktu.