It relies on more assumptions than just that. It relies on the assumption that naturalism and materialism are true, and hence an afterlife is very unlikely (if not impossible).
You can reject naturalism and materialism without agreeing that God exists. Consider the late 19th / early 20th century British idealist philosopher John McTaggart Ellis McTaggart (who at Cambridge acted as the mentor of Bertrand Russell and G. E. Moore) – McTaggart insisted that God did not exist, that he knew God did not exist, that God's existence was impossible – but he also claimed that time and matter are illusions, and the true reality is timeless immortal souls and their eternal love for one another.
Conversely, it is possible to believe in God without an afterlife. The ancient Greek philosopher Epicurus denied an afterlife, but he did not deny the Gods of ancient Greek polytheism. (Probably, if he had lived in a more monotheistic culture, he would have dropped the plural.)
The ancient Jewish Sadducees, who controlled the office of High Priest up until the destruction of the Second Temple in 70 CE, they rejected the Pharisees' belief in resurrection of the dead. (The Pharisees are the historical progenitors of contemporary Judaism; and, while Christianity conflicted with the Pharisees a lot, witness how much they are criticised in the Gospels, one can't deny that Christianity took a lot from them, including the belief in a future resurrection of the dead). It isn't entirely clear what exactly the Sadducees believed about the afterlife, but certainly by some accounts they believed that death was extinction. (Part of it depends on whether they understood "Sheol", the grave, to simply be a symbol for extinction, or an actual place where the dead are conscious.)