Is this a thing? Or did you just spawn a quote for future generations to attribute to anonymous and Mark Twain in the coming centuries?
It's known as the malapropism.
In this case specifically of "to err is human; to forgive is divine," which sounds to me like Johnson but I'm not going to try looking up the attribution because, in this context in particular, the universe's love for irony all but guarantees I'll get it wrong.
...it was Alexander Pope.
Nobody uses those anymore, they're too popular.
English language stackexchange offered up "paraphrasing" and "snowclone", which I've never heard of.