Ok why wouldn't дети be used here? What is the difference between ребёнка and дети?
"Ребёнка" is genitive of "ребёнок" (child - singular). Дети is children (plural).
This has to do with the peculiarities of the Russian counting system:
If the number ends with one, except 11, (e.g. 1, 21 or 1041), you use a singular nominative form: двадцать один ребёнок.
If the number ends with two, three or four, except 12, 13, 14, (e.g. 2, 23 or 1044), you use a singular genitive form: двадцать два ребёнка.
In all other cases (i.e. if the number ends with anything else or is 11, 12, 13 or 14) you use a plural genitive form: пять детей.
That said, with 2,3 and 4 only (but not with 22,23,24 or etc!), and only when talking about people, you can still use a general plural genitive construction, but you need to slightly modify the number itself: