Nouns (in singular) in Polish have 3 genders. The form of the words which are describing the nouns in the sentence depends on the gender of the noun. "Ta" for feminine nouns, "to" for neutrum nouns (example: to dziecko - this kid) and "ten" for masculine (example: ten chłopiec - this boy)
It's the age :)
"Dziewczyna" is literally just "girl" and it's a term you can use to describe teenage girls, but also "young women" in general.
"Dziewczynka", on the other hand, is basically "little girl" ("mała dziewczynka") so it's something you would say to describe a female child.
That said, it's OK that both options are considered correct here because the English word "girl" can refer to both small girls and young women/girls.