CLAIM: In one account, David is said to kill Goliath (1 Sam. 17:50-51). However, in another account, Elhanan kills Goliath (2 Sam. 21:19). Which is true?
RESPONSE: The passage in 2 Samuel 21 is an obvious transmission error. That is, a copyist must have erred in copying this portion of Scripture. Of course, as Christians, we only believe in the original autographs as fully inspired—not the later copies which could be wrong. 1 Chronicles 20:5 states that Elhanan killed the brother of Goliath. Therefore, this was probably mistaken by the copyist. Gleason Archer explains the plausibility of a copyist error, “The copyist of 2 Sam. 21:19 apparently mistook the sign of the direct object (ʾeṯ) for the word beyt (probably because the manuscript was smudged or eroded before the final t), and thus changed Laḥmi into ‘the Bethlehemite’ (Hebrew: B-t-l-ḥ-m-y); then for a similar reason he misread the word brother (ʾ-ḥ) for the sign of the direct object (ʾ-t), which meant that Goliath himself became the object of the slaying instead of Goliath’s brother. In the fifth century b.c. the Hebrew ḥet (h) greatly resembled the appearance of the letter taw (t) and also the letter yod had become very tiny. Additional evidence that the verse was poorly copied in 2 Sam. 21 is afforded by the intrusion of the name Oregim after Jaare. As 1 Chron. 20 shows, this word ʾōregɩ̂m, meaning ‘weavers,’ belonged only after the word for ‘beam.’ This transmissional error must have arisen at a time when the letter ḥet already resembled taw in appearance, but before the Septuagint was translated; that is, between the fifth century and the third century b.c.”
 Archer, G., Jr. (1994). A survey of Old Testament introduction (3rd. ed., p. 315). Chicago: Moody Press.