I am a tenant, and I am selling my second home. I informed the notary that I wanted to reinvest the price in the acquisition of a principal residence and benefit from the exemption from the capital gain provided for in this case (...)

However, I did not do so within the 24-month deadline. Can the exemption be challenged?

Yes. During the first transfer of a dwelling other than the main residence, it is possible to ask to be exempted from the capital gain which has been realized, provided that all or part of the sale price is reused for the acquisition of a main residence.
The transferor must be able to justify the effective reinvestment of this sum, at the latest within 24 months from the date of the transfer. Otherwise, the exemption is called into question during the year of the breach. The transferor must then pay the income tax and social security contributions due for the realized capital gain. These taxes are accompanied by late payment interest which runs from the 1st day of the month following that of the transfer (BOI-RFPI-PVI-10-40-30, §460)