Local food often has higher transportation costs than food from further away. Long distance food transportation is done by highly efficient ship & rail. The last mile transportation costs typically dominate. And semi-trailer from warehouse to grocery store is far more efficient than half-ton truck from farmer to farmer's market.
And then both are dominated by the drive from the grocery store to your house. If you care about food carbon emissions, walk/bike to your grocery store. That'll have far more impact than food choice.