I'm not aware of any laws against putting drugs into your body. Can you cite any? I'm pretty sure all drug laws are possession laws, not consumption laws. Strictly speaking, possession is a superset of consumption: you must possess the drug before you can consume it; and you still possess it even after you consume it, while it is in your body.
In any case, pedantry aside, the simile doens't hold because one is the government telling you that you can't do something, the other is the government telling you that you must do something. Compare this to the controversial "individual mandate" in Obamacare. The Supreme Court ruled that the government could not mandate that you buy health insurance; but that they could tax you if you refuse to do so.
That is consistent with how I think about actions: the government can't force you to vaccinate, but they can deny you access to schools and roads and public squares if you refuse to do so. I suppose they could even tax you.