First of all, you need to know the difference between ~ている form of continual/durative verbs(継続動詞) like 食べる and punctual verbs(瞬間動詞) like 行く. The former expresses "the present progressive" (is eating), whereas the latter is "the current state that results from prior movements" (went somewhere and is there now). For instance, 死ぬ(to die) is a punctual verb, so 死んでいる doesn't mean "to be dying". It actually means "to be dead (died in the past, and as the result of that, is dead now)", so other expressions like 死にそうだ, 死にかけている, 死につつある are used for "to be dying" instead. Similarly, I would say スーパーに行く途中ではありませんでした or like that for "I was not going to the supermarket".