Dpends on what you mean by 'distance to the sun'
Is that to the centre of the sun, or the outermost layer, or the 'surface' of the sun?
And at what time of year?
There is no surface of the sun. There is a layer that emits light in the visible spectrum. That's around 432,000 miles away from the centre.
That temperature in that part of the sun is something like 6000°K
Go further out - over 1 million miles out from the centre - and the temperature in the corona rises to over 1,000,000°K.
If the centre is 93 million miles away, the corona is 92 million miles away (on average).
However, the earth's orbit is not circular. It's an ellipse so that at perihelion, or closest approach (in early January) the earth is 91.4 million miles away from the sun. Six months later (July), the earth has moved around in its orbit and at its furthest (aphelion) it is 94.5 million mies away from the sun.
Like much in science, the more subtle the question, the more complex the answer...
Hope it helps