While none of these men understood God like a Christian would each of them, excepting Confucious because I'm not sure, had a very clear sense of the devine.
You confuse the culture they lived in with their beliefs. Both believed in an afterlife, but neither believed in gods as the source of morals or moral laws. Later confucians let the idea of “heaven” creep in, but it was completely extraneous to their moral beliefs.