I try to fix soldiers distance in formation. How to do that ?

Look at the picture.



How to separate this units?

The same problem is in fight and when they move. They all pass each other.

Pls help me. I don't know what i'm doing wrong.