It is a requirement under Thai law for all foreign nationals marrying in Thailand. Quite a simple process.
Plenty of posts here on the subject. Type Affirmation of Freedom to Marry in the forum search box.
Also, some guidance here:
What passport(s) do you hold? In Thailand, you will need to go to the consulate/embassy of your passport in order to to get your affirmation witnessed and signed.