The short answer is that "will" and "be going to" are exactly the same.
The long answer is that they're exactly the same, but people prefer to use them in different situations (as Helen and Greg described).
Don't caught up worrying about which is right and which is wrong, because they express the same thing. Native speakers DO use them differently, but the difference is that they are more natural in different contexts rather than a difference in meaning.