Hi Gary,
The period of 2 years will be for two whole tax years.
The direct debit will end on your retirement date regardless, but you will need to monitor the collections against the schedule we provided.
Please contact the NI helpline to discuss your current situation to help you decide when to stop the voluntary direct debits.
National Insurance: general enquiries
Thank you.