The Nahuatl language was spoken by the Aztecs, but it wasn't the only language in Mesoamerica. The Aztec Empire was actually a multi-lingual one, with many different indigenous languages spoken within its borders.
So, while the tomato is a staple food in Mexican cuisine and is often associated with the Aztecs, the word itself actually comes from the Nahuatl language, which is distinct from Aztec, though closely related.