In the order passed on Wednesday, District Judge and Additional Sessions Judge, P P Jadhav, also imposed a fine of Rs 10,000 on the convict Nitin Satpal.
Public prosecutor Vinit Kulkarni told the court that the victim and Satpal were neighbours in Juhugaon in Vashi.
The prosecution told the court that the victim's mother, a police constable, used to drop him at the home of the accused whenever she had to work night shifts. The boy used to sleep at Satpal's place till his mother returned from work in the morning.
When she asked the minor about it, he told her what had happened. The woman constable then lodged a complaint at Vashi police station and the accused was immediately arrested.
The court awarded the sentence after convicting Satpal under sections of Protection of Children from Sexual Offences (Pocso) Act.