It's bad luck. This imbalance happens from time to time.
As long as there are some young boys, it will work fine. But only if the age difference is less than 20 years.(unless you're using some population mods, that changes this) As soon as there's a boy of 10, he will move to one of the single women. If he's a stundent or laborer doesn't matter, but only if she's younger than 30 years old.
The only trick I know, if you see, that most children have the same gender, is first to set the autosave, as often as possible. As soon as a child is born, see if it has the gender you want. If not, go back and start the game from the last autosave. There will be a baby born at the same time to the same woman, but it has another name and may have the other gender. If it's still the "wrong" gender go back and try again. It's tedious, I usually don't use this trick. Somehow it will turn out alright anyway. There might be a setback, the growth may stop for a while, but I have never seen that the settlement has "died" because of this.