To be certain, I recommend:
* Checking your owner's manual: It will have diagrams showing the location of major components.
* Using a repair manual specific to your year and engine: These manuals provide detailed diagrams and instructions.
* Searching online for "2004 Chevy Cavalier [2.2L or 2.4L] ignition coil location" with images: You'll likely find pictures from other owners who've done similar work.
Looking at pictures online will give you the most accurate visual confirmation. Remember to always be cautious when working around any engine components.