It should be at the back of the engine close to the DPF but if you just bought the car, you never know whether it is there due to unknown history. Always try to find the part first and check whether you can remove it, before buying.
Now that you bought a new sensor, it will be easy to locate the old one, at least if it is there. But if you bought from a trader, you may have some kind of warranty to help you out.