The more reactive form of the conjugated acid involves protonating at oxygen (which is why protonating at oxygen allows for things like the Beckmann rearrangement), but the oxygen isn't the most basic atom. You're right that sp2 nitrogens are less basic than sp3 nitrogens, but nitrogen is still significantly more basic than oxygen because of its lower electronegativity -- I'm guessing that electronegativity as a factor in basicity is what's being tested here. Generally, the identity of the atom (e.g., whether it's nitrogen vs. oxygen) matters more than the atom's hybridization (e.g., whether it's sp3 vs. sp2). The CARDIO mnemonic, with CARDIO standing for Charge, Atom, Resonance, Dipole Induction, Orbital, can be used to remember the priority order of factors in deciding acid strength (charge is more important than atom, which is more important than resonance, which is more important than dipole induction, which is more important than orbital hybridization).