TILL So if the Chronicle writer's version of the story is true, then the writer of second Samuel made an error. Elhanan didn't kill Goliath; he killed Goliath's brother. How then can you argue that the Bible is inerran?.
I suggest that a more likely explanation for the variation is that the Chronicle writer (who wrote his work after the books of Samuel) recognized the discrepancy and tried to correct it.