The Prophet ﷺ said, "Were it not for the migration, I would be one of the Ansar. And if the Ansar took to a valley or a mountain pass, I would go with the Ansar."
حدثنا محمد بن أبي بكر المقدمي حدثنا أبو حذيفة موسى عن زهير بن محمد عن عبد الله بن محمد بن عقيل
عن النبي ﷺ قال لولا الهجرة لكنت امرأ من الأنصار ولو سلك الأنصار واديا أو شعبا لكنت مع الأنصار
Its chain of transmission is hasan. It was mentioned previously at 21152, and the hadith is one of the additions of Abdullah.