Almost sure it is a M14 x 1.5, If correct the 2004 BMW 318i thermo switch available at any parts store will fit.
I do have a factory KTM one M14 x 1.5 that you could have, but I would require shipping cost on it and am sure it would cost more than the BMW unit from a local parts store.
Can anyone verify the size and pitch to be sure? I also have M18 on the brain for some reason, the switch is at the shop and I at home so I cant even go look at it.