We have a ways to go before then.
This seems short-sighted, as we've been doing that for most of human history, and honestly I don't think we're very close to unveiling all the mysteries of the universe.
We could start building a Dyson sphere right now. It would just take a long, long, long time given our current understanding of physics and technology. Imagine all the things we might be able to achieve with our understanding of physics in 300 years. Imagine the thing we will discover that will have their own Dyson-sphere equivalents. i.e. things we discover that we know (hypothetically) how do do, they are just not quite in our grasp.
The reason why I'm saying it would take in the thousands of years, is because of this tautology: If we want to build a Dyson sphere, it means that we are still limited to the energy we can get from Earth. Given the issues that come with extracting a large percentage of the energy received by the Earth, even if we used fusion (due to thermodynamic constraints), the limit of energy used can be placed around 5-10% of the energy Earth receives from the Sun (And that would require extensive geo-engineering). With that sort of energy output, the energy alone required in order to move the material needed for a Dyson sphere from Earth orbit to Sun orbit would take literally millenia, and that's with a combined effort from all of Mankind, which politically completely impossible for the next centuries unless China or some other superpower was able to magically establish true utopic statless communism and win away the rest of the world to establish a world cooperation of sunshine and rainbows magically.
A Dyson sphere would weight around the mass of the Earth. The Hohmann transfer from Earth to Mercury (fly-bys cannot work due the sheer mass knocking out other planets from their orbits, this is actually the magnitude of energy we're talking about). If we could magically make the material necessary appear from Earth gradually, d/v from earth surface to LEO then from LEO to Mercury's orbit or thereabouts via a Hohmann transfer is of around 15 000 m/s. If you take the good old kinetic energy formula, 1/2mv^2, you find that this would require a staggering amount of energy that would take millenia to amass.
Contrast with the plentitude of natural things we presumably don't understand / know about (unlike the sun) and there is a lot of potential for the future.
That being said, for the construction of a sphere you would presumably not be shipping matter from earth. You'd be towing in matter from asteroid belts and such.
What I'm telling you is that there are hard limits that mean that our growth must slow down. There is a hard limit to how much energy we can harness from the earth, and a hard limit for how fast we can avoid this. Progress will have to slow down, a society based on endless exponential growth at short-term significant rates is untenable.