Unless it were something inherently sinful or sacrilegious (such as, God forbid, someone writing a pornographic novel using personages from the Bible), how in the world could this be a sin?
I wouldn’t mind seeing a historical novel adapting the legends of Jesus having visited England in his youth with St Joseph of Arimathea — the hymn Jerusalem takes this as its inspiration — or his later supposed travels to India. As long as anyone reading the novel could keep in mind “this didn’t actually happen, or at the very least we are taking the bare bones of a legend and embellishing it for dramatic effect, or to flesh out the story”, it sounds like it would be a worthwhile endeavor.