We study the Kondo effect of spin-1/2 magnetic impurities in gapped Z2 spin liquids on two-dimensional lattices. We find that if the impurity is placed at a high-symmetry location, a nontrivial spinon fractionalization class of the impurity site symmetry group will necessarily lead to a non-Kramers doublet in the Kondo screening regime, protected by associated crystalline symmetries. This is in sharp contrast to a featureless screening phase in the usual Kondo effect. We demonstrate this symmetry-protected topological degeneracy by an exactly solvable model and by the large-N theory. Based on this effect, we discuss how thermodynamic measurements in the limit of dilute magnetic impurities can be used to detect symmetry fractionalization in gapped Z2 spin liquids.