Fluorine is a chemically-active element, Atomic #9 on the Periodic Table. Because of its properties, it is classified with the Halogens on the Table, along with Chlorine, Bromine, Iodine, and Astatine. Oxygen, while right next to Fluorine at #8, is classified as an Other Non-Metal, meaning that while it does not share properties with the Noble Gasses and Metalloids, it also does not contain properties of the Halogens. This means that while Fluorine is atomically further away from Chlorine than it is from Oxygen, Fluorine shares more chemical properties with Chlorine. One interesting property of Fluorine is that it creates compounds with the Inert Gasses, which normally do not react with other chemical elements (thus being called "inert"). While both Oxygen and Chlorine are chemically-active, they cannot form compounds with the inert gasses, while Fluorine is the most chemically-active of all the elements.
The location of elements on the periodic table is significant. Elements grouped together on the periodic table have similar electron configurations and therefore similar chemical properties and reactivity. Vertical rows of elements are called groups. Fluorine is a group 17 element. This group has a special name; they are called the halogens. Chlorine is also a halogen. They both have seven valence electrons in their outer shell and as such like to take an additional electron for a stable octet to make the single charged anion. Oxygen is in group 16, has six valence electrons, and likes to exist as the double charged anion. As a result, fluorine's chemical properties more closely resemble that of chlorine, not oxygen.
Chlorine because they are both Halogens. if you look at the periodic table they are in the same column