Additional District and Sessions Judge Ram Pal Singh pronounced the judgment yesterday, prosecution said.
The victim, Kirpal Singh, was aware that his stepmother, Aadesh, was having an illicit affair with their neighbour and had objected to it, they said.
On August 26, 2006, Kirpal had gone to see off a relative at the railway station when Aadesh and her accomplices Sanjiv and Luv Kush murdered him and dumped his body on a railway track.
Kirpal's father, Chhotey Singh, then lodged a report with the police naming his wife as a suspect, they said.
Apart from the sentence, the court has also imposed a fine of Rs 10,000 on each of the convicts, they added.