Part one: food
All ecosystems on Earth depend on autotrophic beings participating in the food chain.
If your fictional people have no access to what we call visible light, plants as we know them won't do. That leaves us with four alternatives:
Chemosynthetisizing bacteria. On Earth they are usually found solely on the bottom of oceans, on termal vents. In a fictional world, chemosynthesizing algae could maybe feed the world for a while, but they need a steady supply of organic matter and a source of heat that might not be feasible to work with.
Radiotrophic fungi. The stuff of nightmares. In our real Earth there are fungi growing inside Chernobyl's plant that can do a process that is related to photosynthesis - but they use melanine to absorb gamma radiation instead of visible light. Supposing your fictional world has high levels radiation (and life in general has adapted to it somehow), such fungi could be the basis of the food chain. Maybe the planet is covered in clouds that let UV, X-rays and gamma rays into the surface of the planet, but not visible light. You could conceive a fungus that absorbs UV if you'd like something less extreme and lethal than gamma rays.
Deux Ex Machina. Technology from the precursos of current humanity includes machines that synthethise food. Life mostly thrives around places where such machines exist.
Leftovers. There is a lot of food lying around to be scavenged (honey, which can last for millenia; or maybe frozen animals if humans are living on glaciers, they just have to dig for it). The amount of available food in the world will be going down fast, so humanity will be on a race against the clock. But if you just froze the entire world really fast, people would have the mass of the whole ecosystems of Earth to eat before they started to starve.
Part two: heat
Not a hard one. Think of Venus. It is covered permanently in clouds. The reason that planet is so bright in the sky is that it reflects most of the light that reaches it. Very little sunlight reaches its surface. Yet its average temperature reaches up to 864°F, due to greenhouse effects.
It doesn't take much suspension of disbelief to accept an Earth-variant covered in clouds, where no sunlight reaches the surface and the temperature is within any range in which humans could live.
Part three: maintaining darkness
You could prevent people from (re)discovering fire by having a very oxygen-rich atmosphere. Anyone who tried to make a little fire would die in an explosion. In time people would learn they can't start fires.
A strong enough magnetic field, the kind that causes auroras but even stronger, could prevent most forms of electricity from becoming useful to humans - electronics would not work, electric energy could become hard or impossible to use if the field keeps changing in impredictable ways. Auroras may be blocked from sight by thick clouds (which would also serve to block starlight).
Last but not least, life in this planet may evolve so that no lifeforms ever develop the DNA for synthesizing luciferin, nor other light-emitting compounds. At least not where humans could see them... Remove fireflies from the world and most people will never see a bioluminescent creature.