We know the sun is made of gas because we have many high-tech pictures that can see inside it and show it. We also believe our sun is just like all the other trillions of stars, so our prediction is based on it. It is only a prediction, Nobody knows with 100% certainty that this will happen.
I personally would like our sun to be special and last forever.