I am a refugee in Scandinavia and have to attend an online university post-graduate program from France (three years). I want to go to France and ask for a residence permit to learn French in order to apply for citizenship. I have read that if you finish two years college, whether online or offline, in France then you can ask citizenship after two years.
What process do I need? Is this information correct?
It's only a basic requirement to apply for naturalisation. Most applications satisfying this requirement are ultimately rejected or at least adjourned (for a long time it was about 50% then peaked at 75% rejection, not sure about the current stats). Among other things, you need to show you speak French, have a stable situation and permanent job (contrat à durée indéterminée), no past illegal stay in France, etc.
It's intended for people who have studied (e.g. at a university) in France for two years (and therefore effectively resided for four years already, as time under a student visa/permit typically does not count). I am not so sure your study would count (What is it exactly? You talk about an online program but also make it sound like a language course) and even if it is not categorically ruled out, it would not look good on your application for citizenship (remember that two years is an absolute minimum before you can ask and it's not common for people to get naturalized that quickly, the authorities legally have quite a bit of discretion in this procedure).
You need a French permit or visa to stay in France long-term (i.e. more than three months, even for study. Assuming you somehow manage to follow this online learning program from Sweden, you would at the very least need a regular residence permit to accrue residence counting towards the 2+ years requirement and wait out the results of the application. Depending on your citizenship and your situation, it might not be trivial to get that permit.
I know next to nothing about French immigration law, but I have worked briefly at the Swedish Immigration Board. If you have a residence permit as a refugee in any of the Scandinavian countries, you effectively have a residence permit for any and all of the EU-countries, including France. Even if your residence permit is from a non-EU Scandinavian country (i.e. Norway or Iceland), the "Schengen" treaty will give you the right to reside in any EU country.
If you have not yet been issued a residence permit in the country where you are, you should wait until you have it before moving to France. You should also direct your question the (1.) the immigration authority with which you have filed for a refugee status residence permit and (2.) the French immigration authorities to get the latest and most accurate information.