Anas bin Malik reported,

The Prophet ﷺ saw a man being supported between two others and asked, "What is the matter with this man?"They replied, "He vowed to walk to the House of Allah."The Prophet ﷺ said, "Allah has no need for this man to torment himself. Tell him to ride."

Nasai 3883

Sahih

أخبرنا إسحق بن إبراهيم قال أنبأنا حماد بن مسعدة عن حميد عن ثابت

عن أنس قال

رأى النبي ﷺ رجلا يهادى بين رجلين فقال ما هذا قالوا نذر أن يمشي إلى بيت الله قال إن الله غني عن تعذيب هذا نفسه مره فليركب

النسائي 3883صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Oaths and vows
Chapter
What is obligatory for one who vowed to do something but was unable to fulfill it
Numbering
Darussalam 3883
Nasai 3883