That's true; I was objecting to the claim that it was "grandfathered in when child porn laws were written". The reason a law couldn't ban it is because of the First Amendment.
Definitely agree that Lolita is a written text and not a visual depiction of children engaged in sexual activity. So it's not covered by child porn laws, and is still protected by the First Amendment.
But wanted to highlight that the law can ban speech, despite the First Amendment. For example, in 1982 the Supreme Court ruled unanimously that child porn was not protected by the First Amendment: