A credible referral can still be useful even when the person sits in another office, because they are vouching for you as a candidate rather than simply providing local access.
The local office may still evaluate fit, hiring need, and your reason for choosing that geography independently.
Do not force a weaker local referral just for the office match. A strong recommendation from someone who actually knows you is generally more meaningful than a shallow connection in the target location.