I find this a slightly odd question. Any author of fiction is going to be writing characters who are very different from themselves in scores of ways. I’ve written characters who are male, good with a sword, live in multi-couple marriages, rule a nation, can ride a horse, summon eagles or speak many languages, none of which can be said of me. And then there’s magic: my characters can spout fire from their fingertips, bend metal with mental power, manipulate emotions in other people and read memories. Their beliefs are the least of it.
As far as religious belief goes, my world has a slightly uneasy relationship with it, since one group of people likes to use religion as a tool: to keep the population under control, or to disseminate a useful idea. And they create religions wholesale, simply making up gods and mythology and rituals, as it suits them. There are characters who believe all this completely, and others who don’t believe any of it, and the majority who think there’s probably something in it, and go along with the public ceremonies to avoid censure. Which is not that different from our own world.
As for other beliefs, it’s fun to write characters who are completely confident that there are no dragons, for instance, or that magic is just a parlour trick, and have them brought face to face with a different reality. So no, I don’t find it difficult at all to write characters who have different beliefs from me, and in many ways this is one of the beauties of writing fiction: to explore ideas and customs that are entirely alien to us in the modern world. I would almost go further, and say that it’s one of the purposes of writing fiction. There’s surely little point in writing only about the familiar.
Footnote: Authors Answer is the brainchild of blogger Jay Dee Archer, of I Read Encyclopedias For Fun. You can read the answers to this question by his eclectic bunch of authors here. More recently, Erica Dakin, of the Theft And Sorcery blog, has been answering the questions independently. You can read her answer to this question here.