The difference is stylistic. The subject and verb are the same for both sentences. The only difference is that sentence #1 contains an extra adjective, "going", to describe the subject "I". Inserting this extra adjective makes sentence #1 feel more descriptive, more colorful, and more conversational. That is the only difference.
You can omit the word "going" without changing the meaning:
"I am to be 30 years old".
(Neither "will" nor "going" is necessary to speak of the future.)
"Going" might look like a verb, and is derived from a verb, but it acts as an adjective, not a verb in sentence #1. Its grammatical role is similar to that of the adjective "happy" in the sentence
"I am happy to be 30 years old"
except that "happy" does not suggest the future the way that "going" does. You could say this even the day before your 31st birthday.
Actually, you could also say "I am going to be 30 years old" even if you will be 31 tomorrow. In that situation, it would mean "I am going to act like I am 30 years old (while I still can)".
Come to think of it, you can say "I am going to be 30 years old" even if you are 40. It would mean "I am going to act as if I were 30 years old".
"Future" is a subtle thing in English. There are no magic rules. Future is implied primarily through context. Words like "will" and "going" are often helpful but neither one is inextricably linked to the future.