Obesity is much more complicated than that. Saying it's as easy as that, just like the sugar tax will do sweet f*all., I'm afraid.
I definitely agree that in some cases obesity is complicated. I was on high doses of steroids several years ago and blimped up badly. It took quite a long time to get off them and back to a "normal" weight. My comment is in relation to the general public, not people with medical, psychological, or mobility issues.
Without their being a metabolic/medical/mobility reason involved, I am comfortable saying that my belief is that the majority of overweight people are overweight for one reason - they take in more calories than they burn. They're either eating too much or moving too little, or a combination of both. Their "fat" (sorry to have to use an unpopular term), like the wad I'm carrying around my middle presently, is a lifestyle issue. And, as with most lifestyle issues, it's a matter of choice. Lack of education may be at play, but the bottom line is that if you take in more calories than you burn, unless you have a truly exceptional metabolism, you blimp up.
So, I would be way more supportive of a serious educational outreach regarding nutrition and weight, and the potential future health impacts of being obese, than I am of the "sugar tax."