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.
"On the intervening night of August 1 and 2 in 2015 when the victim was sleeping at Satpal's house, the latter sexually assaulted him. Next morning, when the boy's mother was bathing him, she found injuries on his private parts," the prosecutor told the court.
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.