If we want to address global climate change, then we need to look into minimizing total energy put into things like food. Often that will mean growing things where they can grow most easily, with the least amount of energy. A banana brought thousands of miles by very efficient transport is more sustainable than grown in an ill-suited climate through the application of energy-expensive heat/light etc. Distance is not everything.
Minimizing total energy is indeed the name of the game. To do that, we have to recognize that we may have over-extended a little bit as a civilization, and to pull back on some of the more hubristic enterprises like bananas in Maine or avocados in Sweden during winter in the Northern hemisphere. We can still have those things, but at a minimum the costs for the consumer should reflect the costs of transportation, including costs normally externalized (excluded) from supply chain analyses.
Interesting you should mention that, this was actually the dinner table subject a few days ago when I explained to my kids that what they think is 'normal' has only been the case for a couple of decades at best and that in the not so very distant past winter meant that you were not going to have a whole lot of fresh stuff. They found it quite incredible that you would not be able to buy apples or bananas year round.
The big issue with agriculture and environmental disasters like climate change and biodiversity loss is land use patterns. That implies a need to drastically replace consumption of very land-inefficient uses like beef with mostly plant based foods.
But yes, I completely agree with you that 'food miles' is largely a distraction.
We can't easily pack humans more densely into trucks, so reducing their miles traveled has a much bigger effect (and if the distances are shorter they can also walk/bike/bus instead of single occupancy vehicle).
We basically can, with decent urban transit and rail services.
An articulated bus has a curb weight of about 35,000 lb and a capacity of up to 92 passengers. At 177 lb each, that's a gross weight of 51,284 lb. (net: 16,284 lb of passengers).
I'd presume a potato's density is close to that of water. As such, capacity is actually mass rather than volume-constrained --- you'd be unable to fill a truck to its volumetric carrying capacity before exceeding gross vehicle weight limits.
Many grocery products have much lower density: chips, bread, paper products, etc.
I still tend to agree it makes more sense to move goods than people, but the differential may not be quite as great as you might think.
The thing people don't realize is that industrial farming is actually extremely carbon-emission efficient. Even your food coming from a container ship from halfway around the world, transported via freight, and driven last mile in a semi is less carbon intensive than getting a delivery from a local (XX miles away) farm.
This seems to be trivially true as well for an entire city of inefficient farms with any expectation of modern amenities.