It's often not a question of time with these forms. If I think about it first, then I'll say 'I am going to get a coke', but if I suddenly decide to do it, I will say 'I will get a coke'. 'Going to' is often used for our plans and intentions, but when we decide now, we use 'will'.