As Zaguru12 said, it will be dropped by the nodes' mempools. It generally takes 2 weeks to be dropped if the fees don't fall below your fee rate.
There are many mempools, not only one mempool. A waiting transaction can be dropped from one mempool but it can be chosen or not drop by other mempools.
The question is seriously because it asks for chance to get a confirmation after 1 or 2 years and honestly I am not sure all mempools will not drop that transaction if it stuck like 1 or 2 years. Mempools have their max mempool size, mempool expiration time and they can update their min transaction fee too.
Chance to see an unconfirmed transaction is not dropped from mempools after 1 or 2 years is like impossible.