1
You should avoid to eat too much sugar.
You should avoid eating too much sugar.
After avoid, use a verb ending in -ing, not to + verb.
2
We will take measures to avoid that this situation happens again.
We will take measures to prevent this situation from happening again.
She wanted to avoid that he travelled.
She wanted to prevent him from travelling.
Do not use avoid + that. Use prevent someone from doing something to stop a person from doing something. Similarly, prevent something from happening means ‘to stop something from happening’.