It’s not stupid, crocodilians are bloody confusing.
But to answer your question simply: no, they’re not. Crocodiles and alligators are more closely related to birds. They come from the same class (Reptilia - which you already know) as lizards, but different supgroubs & orders. If you want to look into it more, try researching Squamata, Archosaur, Tuatara and Reptilia itself.