Idiomatically you should have
... sentences the accused to five years for ....
"years" is a noun, and the object of the preposition "to", forming a prepositional phrase with the numeral "five". "Five years" is an idiomatic shortening, meaning "a time in prison lasting five years".
Similarly "for committing..." is a prepositional phrase. It includes an -ing form of a verb (participle/gerund)
In the example, the verb is in the present tense. This is the "commentary" present tense. It is used for describing actions that take place as they are described (like a sports commentator describing a game). The verb could be in the past tense, if you were describing past actions. It is a regular verb.
Yesterday, the court sentenced the accused to five years.