All of them are correct but with slightly different meaning.
I am not buying that flat.
This can be used for example if somebody tells you to buy it but you don't want to.
- You should buy that flat.
- I'm not buying that flat.
Also if you want to emphasise your unwillingness to buy it and decision on not to buy it you could use this phrasing.
I am not going to buy that flat.
In this case you're certain you won't buy it, for example somebody asks you and you reply conveying the fact that you already decided, maybe you already found a better one.
- Have you decided on buying that flat?
- I have. I'm not going to buy it, I found a better one.
The third is the simple future.
I will not buy that flat.
With this you just state a future intention, but it doesn't have the same certainty behind it as the "going to". Also you might use this when for example you're checking out the flat and you decide there that you won't buy it, it's your on-the-spot decision.
You can read a summary about this here