The Prophet ﷺ said, "Were it not for the emigration, I would be one of the Ansar, and if the Ansar took to a valley, or he said a mountain pass, I would be with the Ansar."
وقال لولا الهجرة لكنت امرأ من الأنصار ولو سلك الأنصار واديا أو قال شعبا لكنت من الأنصار
Its chain of transmission is hasan. It has already been mentioned at 21143, and the hadith is among the additions of Abdullah.