The teenager, whose identity has not been revealed as he is a minor, had pleaded guilty in April to one count of murder and one count of attempted armed robbery in the killing of 21-year-old Garg.
Garg, who migrated from Punjab, was fatally stabbed in the abdomen by assailants in Cruickshank Park in Melbourne's Yarraville while on his way to work in January last year.
Justice Paul Coghlan of the Victoria state Supreme Court sentenced the teenager to 13 years in jail, with a non-parole period of eight years, Australian news agency AAP reported.
Justice Coghlan said the killing was awful and tragic.
He, however, said it was a crime of opportunity rather than race.
He found the task of sentencing a very difficult one, the judge said. "In circumstances such as these there are just no winners."
The justice said one able young man was dead, while the teenager's life had changed forever.
"Although this was a very serious crime, it was committed spontaneously," he said, adding, "It should be noted, however, that you chose to arm yourself and did a great deal to avoid apprehension for your crime."
The accused was 15 and a half when he stabbed Garg, an accounts graduate.
The murder, which followed a series of attacks on Indians, made international headlines and provoked fear among Indian students in Australia. The incident led to outcry in India, forcing the police authorities to solve it.
Coghlan said for "reasons never explained" the accused teenager left the house with a folding knife in his pocket.
The judge said that the boys were in the park when Garg walked past on his way to work at the Yarraville Hungry Jack's restaurant on the corner of Geelong and Somerville roads and was talking on his phone.
The boy's friend said "that bloke's phone looks nice" so the boy took his long-sleeve jumper off and wrapped it over his face saying he was going to "roll" Garg.
He held the knife up to Garg and demanded his phone.
Coghlan said Garg grabbed the boy but the boy stabbed him in the abdomen.
Garg ran to his work where he collapsed and he died in the Royal Melbourne Hospital in the early hours of the following morning.
Coghlan said that after the attack the boy went home and watched a movie and found out the following day that Garg had died.
He said, however, that it had taken some time for the boy to speak to police.
He said the boy's friend had made a statement to police last May implicating both of them in the crime and the boy was not charged until June. He has been in custody ever since.
Coghlan said he accepted the boy was remorseful and had no intention to kill when he went to the park.
He said Garg was "an innocent and random victim" and it was his presence in the park, not his race, that led to him being attacked.
The Garg's stabbing was widely condemned with the Indian government warning it could affect bilateral ties.