The Chasam Sofer (Shu”t Y.D. 2 :155) writes in the name of
The Achronim “You can’t rely on the Agadah of בת כ' לא חטאה
שהרי אינה בת עונשין .
According to Halacha, once you become a Gadol with years
(13 -12) and Simanim, you are Chayav all the Chiyuvei Torah
of Bais Din Shel Ma’aloh and Matoh".
The Chasam Sofer says the Shiur of 20 years
Is applicable only to Aveiros of the Dor Hamidbor
or Aveiros of Kodem Matan Torah. On the Taryag Mitzvohs
this does not apply.