English Translation
When are you going to quit smoking?
wrong
When are you going to quit smoking?
wrong
Why do you think it’s wrong?
Both look like good translations of each other. Sure, it’s not as literal as can be (e.g. will vs. going to), but each uses the usual way to express this.
In German you could also say “das Rauchen aufgeben”, but “mit dem Rauchen aufhören” is perfectly fine.