A 17-year-old found guilty of stabbing his schoolmate in Royal Wootton Bassett has been sentenced to prison.