Religion is not a single thing. It is a complex set of things. What form it will take in the human future depends on which of its components come to dominate it.
Religion consists of a set of doctrines, as well as spiritual feelings and experiences. Spirituality, based directly on human experiences, will probably continue forever. Our brains have experiences such as the following, which I listed in Chapter 7 of my forthcoming book, Life of Earth: ecstasy; loss of awareness of having a defined body; altruism; need for an authority figure; awareness of death; and belief that phenomena are caused by invisible persons. It is likely that each of these is caused by a particular brain function. They will never go away, except perhaps over a longer period of time than human civilization has yet existed; and we will probably always interpret them as spiritual experiences.
But the doctrines are memes. They are culturally transmitted. However unlikely it seems at the moment, these memes can die away quickly, over a very few generations. I do not expect many of them to die away, but I can at least hope that the more oppressive and destructive of them will become extinct. For example, the idea that God will send most people who have ever lived to a hell in which they will experience conscious eternal torture. This doctrinal belief makes people comfortable with the idea that it is acceptable to torture or harm other people. Another example: the idea that God has given our religious group the unique truth, and has not given it to anyone else. This doctrinal belief makes people comfortable with the idea that they can sweep aside other religious groups by whatever means necessary. The time for belief in God as Supreme Torturer and Dispenser of Unique Truth to Fundamentalists Who Can Enforce It (whether in Christian or Muslim garb) must end as speedily as possible. We should oppose these ideas vigorously and without interruption for as long as it takes to ensure their memetic extinction. One of the best ways to do this is just to educate people—about evolution and about the brain chemistry basis of our thoughts, for example.
And when we do so, should we happen to succeed at some point long after my life is over, what will we have? Perhaps, primarily, we will have spirituality—people who worship God by feeling the inspiration of nature and by living by the Golden Rule. People who think and act the way Jesus did when he was out in the hills. The component of religion that makes people better, not worse. This may be impossible, but it is a future worth working for.