Nothing contained in section 360 of the Code of Criminal Procedure, 1973 or in the Probation of Offenders Act, 1958 shall apply to a person convicted of an offence under this Act unless such person is under eighteen years of age or that the offence for which such person is convicted is punishable under section 26 or section 27.