my tdi 2013 with 200.000 km has two lights on, DPF malfunctioning (that turn on/off by itself) and engine (pretty sure due to bad diesel here in Canada)
These lights are used to indicate a lot of different errors. You need to do a VCDS scan on the vehicle to retrieve the actual fault codes and details, which will pinpoint the problem with more accuracy. If you don't have access to VCDS, you can use an ODB2 reader, but that will return just generic codes, which - albeit - will yield more information than those two lights, but still be not as accurate as a VCDS scan.
The DPF light says it won't run the vehicle in 700km, however is saying that since the last 2000km.... the malfunctioning alarm goes on/off so often that I believe it's only a false contact in the sensor itself.
You can't know that. The lights going on and off can have several reasons. And even if it was just a sensor issue, that could also very well damage your vehicle "permanently" (ie result in the need to repair and replacement of other, affected components).
Anyone has ever tried to replace it? Do you know where it is located
The DPF is part if the exhaust system, so it is located under the belly of your car, usually near the transfer box, under the front seat row.
and how much does it cost on average?
Exact prices may vary by market and model, but generally expect it to cost around 2000-3000 Euro when bought new and from a VW dealership. There are also methods to clean the DPF (which usually do not work well, but might give you a few ten thousand miles more), and to replace its innards, which however might not be legal in all jurisdictions and might lead to the vehicle failing the MOT / DMV inspection, if noticed.