The action of the police is justified as the Section 2(d) of the POCSO Act defines any person under the age of 18 as a 'child'. This Act provides justice without any gender discrimination as every person under the age of 18 are incompetent to give their consent. Hence, any person involved in any s*xual act covered under the act and the victim involved is under the age of 18, the offence is punishable as it is considered to be a violation of this Act.
The Act does not recognise consensual s*xual acts between two minors or between a minor and a major and the consent is immaterial in such cases.
The Act imposes minimum imprisonment of 10 years for having s*x with a minor.
Although the Madras High Court had suggested on excluding consensual s*x of people above 16 years of age from the POCSO Act or reduce the punishment after looking at the mitigating factors.
I hope this answers your query.