"They have vacation in July and August."
Translation:Ils ont des vacances en juillet et août.
As far as I know, "vacation" can be used in the plural form as well, for instance "I spent my vacations...". https://www.linguee.de/deutsch-englisch/search?source=auto=on+my+vacations But note that "to be on vacation" just exists in the singular form.
In French it has to be the plural "les vacances".
Perhaps because you used "they are on vacation ..." rather than "they have vacation ..." The first may prompt " during July and August" which would equate to the proposition you were presented with.
Ils sont en vacances pendant juillet et août = "They are on vacation during July and August"