The incident took place yesterday.
The accused were arrested after a case was registered at the New Mandi police station based on a complaint by his parents, police said.
The boy was beaten up after he tried to stop them from sexually assaulting him, police said.
The country has witnessed an outcry in the past few weeks over a spate in sexual crimes against minors. The rape and murder of an eight-year-old in Jammu and Kashmir's Kathua and the Unnao rape case reported in Uttar Pradesh - where a BJP legislator Kuldeep Singh Sengar is among the accused - had triggered protests in several Indian cities. The Union Cabinet cleared an ordinance last week to allow death penalty for rape of children below 12 years of age. The ordinance was signed by President Ram Nath Kovind on Sunday.
Follow NDTV for latest election news and live coverage of assembly elections 2019 in Maharashtra and Haryana.
Subscribe to our YouTube channel, like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.