"вісімнадсять рокі" - This is wrong, there's only one variant for "18 years"
And it's not "вісімнадсять років" either. There's should be letter "ц" - "Вісімнадцять"
The Genitive plural of рік is років (the word does not even have the form «рокі»). And that's what you'd want to use here.
- if your number ends in "один/одна/одне", use Nominative singular
- if your Number ends in any of the words "два/дві", "три" or "чотири", use Nominative plural
- if it ends in anything else, use Genitive plural.
Technically, the last rule is the same as English structures like "a lot of cars", "a basket of apples", "a cup of beads" etc. Words for large numbers used to be "nouns" ages ago, when people, probably, still were new to counting and using large numbers.
Oh, and this is the rule for Nominative (or Accusative in cases where it copies the Nominative form).