It’s illegal if it’s visual material indistinguishable from a photograph of a real child. As far as I’m aware there has been no case where written fiction about a living minor has been prosecuted in the United states.

Again, I neither create nor am interested in rpf. But it’s not illegal.