The court also levied a fine of Rs 60,000 on Lt Col (retd) Ramaraj, 50, of which Rs.50,000 has to be given to the family of the victim, K Dilshan, said a prosecution lawyer.
Reacting to the judgement, Dilshan's mother K Kalaivani told reporters assembled at the court: "I am happy. It is a good judgement. This will be a lesson to everybody. Such incidents should not happen to anyone, anywhere in the world."
A prosecution lawyer told reporters that the hearing by the court began in September and ended April 11. Around 55 witnesses were examined by the court.
The Tamil Nadu police cracked the case within a week after the killing of the boy.
According to police, Ramaraj was irritated by the boy's trespassing his residential premises to pick up almond nuts.
Police had charged that Dilshan was shot by Ramaraj from the balcony of his residence July 3 afternoon when the boy and his friends entered the residential campus to pluck almonds.
Dilshan was fatally wounded and succumbed to injuries in a hospital. Ramaraj has three sons serving in the army.