In an infinite, starless void, a fusion-powered habitat could keep humans alive for millions of years. But without planets to mine, every microscopic air leak guarantees extinction.
To endure the isolation, people would need to live inside an artificial closed-loop ecosystem, such as an O'Neill cylinder. This massive spacecraft would spin to provide artificial gravity, housing an internal biosphere built with soil, water, atmospheric gases, and genetically diverse plant and animal life brought from their origin point.
The most immediate challenge in empty space is energy. Without a star to provide solar power or heat, the habitat must rely entirely on internal reserves. A civilization utilizing nuclear fusion could tap onboard tanks of hydrogen or helium-3 to generate light and electricity, using the waste heat to maintain a livable climate. While a massive generation ship carrying an ocean's worth of hydrogen could power a society for eons, the fuel reserves will eventually run dry.
The absolute limit on this isolated civilization is the Second Law of Thermodynamics, which dictates that no closed system can operate with perfect efficiency. Even if the inhabitants possess advanced recycling technology that flawlessly converts biological waste back into food and clean water, the mechanical and structural systems will slowly degrade. Frictional wear breaks down moving parts, while trace amounts of atmosphere inevitably bleed into the vacuum of space.
With no external source of raw materials, it is impossible to replace this lost mass. Every escaped molecule and permanently degraded machine component brings the habitat closer to failure. Once the onboard fuel is consumed, the internal temperature of the cylinder will inevitably drop to match the freezing ambient cold of the void, ending the civilization.