What is your current position in Thailand?
Permanent residence needs three unbroken years of one-year non-immigrant extensions just before you apply. Your visa type is printed on the visa or extension stamp in your passport. Retirement extensions do not count, even though they are non-immigrant.