Whether solid or a swarm, a problem that occurs to me long-term in building a dyson structure are damaging flares and magnetic storms from the host star. It seems like the absolute best option would be to build a structure around a fresh white dwarf, which is unlikely to be terribly turbulent, but it should still radiate useful heat for millions of years. Assuming you can find - and travel to a white dwarf with nearby materials for the construction. Is there a better stellar object to build your dyson structure around?
your home star
For the first Dyson sphere of a species you will always find it around its home star. The star it has evolved around. It dous not need to be complete. But significant buildup of the starting solar system will occur before damage to the sphere becomes too problematic triggering a large exodus. This may or may not occur and is largely dependant on your culture rather than star-type.
Later on after building multiple spheres a species may come to find that certain stars more suitable for large populations. Most likely those that offer the easiest and best of travel options available in the galaxy (Kinda like where large cities form nowadays.). This depends a lot on how one is to be travelling. And may not reflect the places with the least amount of maintenance required.
If you are looking for the very best in the very long term then you are looking at a spinning black hole. Those are the most efficient in the conversion of matter to energy. And your civilisation will be constantly feeding the black hole with random excess matter.
Avoid fast spinners
I think it will always be a dwarf, but be careful with white dwarfs. They look like a spike of light hurting your eyes. And white dwarfs are very active stars. They can spin fast, that is have a huge magnetic field, which may result in electric currents in your Dyson sphere, that could be inconvenient for people living there.
Managing the energy
A red or brown dwarf may be more appropriate.. you don't want too much energy inside a closed Dyson sphere. As opposed to a normal solar system, the energy will stay inside. Heat will have to be removed through the hull in some way.
Pick your size, then pick your star
Suppose the Dyson sphere would be relatively small, say Venus, or Mercury orbit size. Pick a suitable heater: a brown dwarf (nearly extinguished star) can maintain the melting temperature of iron, for tens of millions of years. If you want a big Dyson, spanning e.g. Earth's orbit, maybe you'd prefer a red, or yellow dwarf ? So the answer to this question would also depend on the size you want to build.
Here is the fun thing about a Dyson Shell, sphere or swarm but swarms are better, it can be used, during production and later to control and/or alter the star it is built around. A Dyson Shell is, if built for it, capable of creating vast, extremely powerful, and finely tuned, magnetic fields. Those can be used to capture and funnel interstellar hydrogen, turning the star system into essentially a giant Bussard reactor, (not necessarily a jet just a huge fusion plant, or a jet that moves the star system) increasing the size and temperature of the primary, and/or they can be used in star lifting operations to remove material from the star to reduce it's output. You probably want to maintain your Dyson star at roughly the same spectrum as your original home star, you and every other form of life-as-you-know-it has evolved for that level of output after all. The output will be slightly different if you're using a swarm or a double layer Dyson Sphere that has an atmosphere seal layer inside, rather than using gravity generators or spin, due to the refraction/absorption of the windows or the atmosphere seal.
But that's on the day you move in; you may want to start your building project at a much larger star though and star lift most of the material for the shell directly from the host star. This lets you tune the star to your needs and you're not completely reliant on planetary material for construction.
Assuming you're aim is longevity and that you don't care to do the engineering, or wisely don't trust your civilisation survive and maintain control, and are willing to put up with the complications of shifting your ecosystem to a different spectrum then you want a large-ish, older, stable, red dwarf like Barnard (in fact something a little larger and even older would be even better because it would be more stable still). Regardless of stellar class a flare, let alone a CME, hitting a Dyson Shell will be a catastrophe of vast proportions, it is slightly worse on a red dwarf because of the closer proximity of the goldilocks zone but only slightly because the flares have much lower absolute initial magnitude and dissipate at the same rate. In return for accepting slightly worse flare damage you're trading a few billion years for 10s of trillions of years of habitability.
Here is an out of the box idea...
Use a gas giant as a fuel and gravity source but handle the fusion through the same advanced technology with which you are building the sphere. This technique cuts down on the amount of material needed to build sphere and since you will be in control of the radiation output, flares and aberrant magnetic fields shouldn't be a major problem.
You will also avoid the disappearing star problem...
The creation of a Dyson sphere announces itself across the galaxy by the disappearance of a star from the skies of every civilization which is advanced enough to be tracking the contents of theirs skies. For those civilizations close enough and advanced enough to investigate, that disappearance is a mystery worth looking into. If the investigating civilization also happens to be imperialistic, xenophobic or just plain evil, their curiosity could have extremely negative consequences for your sphere builders.
By building your sphere around a humble little gas giant, and keeping its size down to the approximate diameter of the original planetary atmosphere, you are much more likely to stay unnoticed by any hostile star empires which might be watching.