Praise be to Allah.
If the company system will accept paying off the debt with the lump sum paid at retirement, there is nothing wrong with that. You can come to an agreement with the company for that, and you will have paid off your debt thereby.
But if the due date for paying off the debt comes before you receive the lump sum, it is not permissible for you to delay it unless the company agrees to that. Just establishing your right to the lump sum does not count as paying off the debt, because this money is not handed over unless certain conditions that are well known in companies are met, such as reaching retirement age or leaving work.
And Allaah knows best.