To be certain, you should:
* Consult your vehicle's repair manual: This is the most reliable source for the exact location. The manual will have diagrams and specific instructions.
* Use a reliable online parts diagram: Many online auto parts stores (like AutoZone, Advance Auto Parts, etc.) allow you to select your vehicle's year, make, model, and engine, and then view a parts diagram that will show the knock sensor's location.
Without knowing the exact engine in your 1999 Malibu, I can only give a general location. Visually inspecting the engine block on the passenger side, near the front, is the best way to locate it after consulting a repair manual or parts diagram. It's usually a small, threaded sensor.