Short answer is no
Long answer is of course "it depends"
There is data out there I've seen thrown about that says something like 75% of doctors end up practicing within 250 miles of where they complete their final step in training (either residency or fellowship). I'm not sure the exact percentages or distance. I've also seen people talk about how "everyone goes back again" in the sense that many, many physicians return to areas where they've been previously even if they go elsewhere for training. Both of these ideas certainly makes sense - people who want to stay close to family are more likely to choose a training program close to home and to subsequently look for jobs close to home, and even if you are someone who has moved around for training (like me), when faced with the proposition of moving around with a spouse and kids, going places that are familiar is a lot more attractive than starting over and trying to put down new roots. I think many people readily feel nostalgia for places they used to live, the whole idea of class reunions and college homecoming festivities is based completely on that idea.
So from that perspective, in a general sense, training locations matter.
Even if you don't have any particular ties to an area when you arrive, where you train ends up creating a number of connections that are important in a job search. Your attendings, co-residents, and graduates of your program are most likely to be closer, and the reputation of your training program will be the strongest the closer you are.
And if you are single when you start residency and end up meeting that future spouse, odds are they will have connections to the area that will color your decision making.
On the other hand, there are certain specialties that require graduating trainees to conduct a fairly broad job search. These are usually small or niche fields that need a certain catchment area size or certain hospital resources that not every place is going to have. For example, as a PICU attending, there are only so many Pediatric ICU's, the majority of which are academic positions, and those that aren't academic tend to be smaller, lower acuity units that aren't appropriate for graduating fellows to finish their clinical development. With such a limited number of landing spots, it's very challenging to completely limit oneself geographically.
Additionally, certain career trajectories - namely those who are looking to do significant research time - also will have to go where the jobs take them, regardless of any special desire to stay in one spot. Whether it's a specific mentor, an institutional focus on your disease process, or just trying to find the right research support, the location often takes a backseat to nearly everything else.