Nothing contained in section 360 of the Code of Criminal Procedure, 1973 (2 of 1974) or in the Probation of Offenders Act, 1958 (20 of 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.