Yes, it's fine. You can stop reading here! It's fine.
It is also fine to say "I'm twenty-one years old" or simply "I'm twenty-one."
To some extent, if you are answering a question you would take your cue from the question.
"What is your age?"
"My age is twenty-one." or
"I'm twenty-one." (less formal), or
"I'm twenty-one years of age." (very formal).
"How old are you?"
"I'm twenty-one." or,
"I'm twenty-one years old." or, even just
"Twenty-one."