One of the conditions for applying the Hadd punishment is that the perpetrator must be accountable, it does not apply to a child below the age of puberty.
رفع القلم عن ثلاثة عن النائم حتى يستيقظ وعن الصبي حتى يحتلم وعن المجنون حتى يعقل
The pen has been lifted from three: a sleeper till he awakes, a boy till he reaches puberty, and a lunatic till he comes to reason.
— Abu Dawud
لا حد على الزاني والزانية إلا بشروط، منها متفق عليه، ومنها مختلف فيه، وهي عشرة
الأول ـ أن يكون الزاني بالغا، فلا يحد الصبي غير البالغ بالاتفاق
There is no Hadd on the fornicator and fornicatress except when certain conditions are met. Some of them are agreed upon and in some there is disagreement. And these are ten conditions:
First ـ That the fornicator be an adult, hence there is consensus that there will be no Hadd on a child.
— الفقه الإسلامي وأدلته
However a person below 18 years may still be considered an adult in Islam if he\she has reached puberty, in which case the Hadd will apply if other conditions are met.
The Hadd applies for the form of Zina in which the head of the penis has disappeared into the vagina or the anus (See the answers here and here) - it does not apply to any other act. Such acts may however carry a Ta'zir punishment.