The door ajar switch is intigrated in the door latch, but is available and quite easy to replace. Its quite common on many Ford products.
You only need to replace the switch not the latch.
Finding the door that the problem switch is in is the fun part, usually the drivers side but you will need to do a little tapping at the latch and open and close the door till it jiggles and works once or twise. Sometimes some spray lube into the latch back will loosen it up. Its spring loaded inside the switch and gets dirty and about the size of a 357 bullet. When you find the right door then take off the intirior panell and follow the wires that go to the latch.
There are a few different ones that they carry at the dealer make sure you get the one for your vehicle, youll know by the color of the plastic collar.