I see no particular obvious difference between these two usages. If context does not allow to disambiguate, then it can mean either thing, or even both things.
Quand vais-je faire les courses ? Je vais les faire demain. (Near future)
Où vais-je ? Je vais faire les courses. (I'm going now with the purpose of grocery shopping)
Il va pleuvoir. (From context, this can only be near future, since the pronoun here is impersonal)
Je vais faire mon marché. (This is both saying that I am going to the market with the intent to shop and that I will be shopping in the near future)
Je vais m'arrêter de fumer. (From context, this can only be near future, since stopping to smoke is not something you need to move to do)