児童 is defined in the School Education Act as children from the age of six to twelve who goes to elementary school and in some laws like the Child Welfare Act as children under eighteen.
児童 is used in formal names like 児童養護施設 (children's institution), 児童相談所 (child consultation center), etc. That is to say, 児童 is a formal and legal word for children whose age is under eighteen.
子供 generally means a child as indicated in the following link, こども【子供】