There is no difference in meaning betweeen -ujo ans -io in country names that are derived from a demonym (a word referring to a person's nationality).
Zamenhof used -ujo, whereas -io was introduced by Hector Hodler (the founder of UEA) in 1918. In 1922 the Lingva Komitato (the predecessor of Akademio de Esperanto) advised against the usage of -io, but as its usage grew nevertheless, the Akademio de Esperanto decided to undo this advice against -io in 1974. This decision in 1974 did however neither make -io official nor recommended, but just tolerated.
While in the 1990s, -ujo was almost dying out, it is having a comeback in the last 10-20 years. The main reason for this is that the use of -io in country names derived from demonyms is causing confusion to learners of Esperanto, as there are also many country word roots (like Aŭstrali/ and Ĉili/) that end in i and can thus be confused for a derived country name (see my answer to a related question). If one uses -ujo for the derived country names, one cannot confuse them with these non-derived country names ending in -io. The distinction is important for knowing what the demonym is (the demonym corresponding to Ĉinujo/Ĉinio is ĉino, but the demonym corresponding to Ĉilio is ĉiliano).
For this reason, the course on lernu! teaches mainly the forms with -ujo, and many highly regarded Esperanto speakers (e.g. many members of the Akademio de Esperanto) use only -ujo in country names derived from demonyms.