There’s confusion between “Kazakh” and “Cossack”, much was at stake on definitions like this, especially in earlier times when Turanic ideas were en vogue. Tolstoy’s novel is about the people mentioned here, who are Christian.
Source is in Russian (couldn’t find an English one): https://ru.m.wikipedia.org/wiki/Атаман
Here are Wikipedia pages in Ukrainian and English
The differences in the two versions is interesting. It's mostly some subtle differences in hair styles and clothing design. I'm curious what the exact motivation/reasons were.