The context of this passage, as shown in 10:32-33, is to confess God before men, indicating that fear of man should not stop one from acknowledging him before others. Notice the contrast between fearing those who kill the body (plural) versus the one who can destroy both body and soul in Gehenna (singular). There are many who can kill the body, but only one can destroy the soul.
But who is the object of fear in v. 28? Who is the one who is able to destroy both body and soul in Gehenna? Christians have historically answered this question by stating that God himself is the object of fear in v. 28.
In the late 4th or early 5th century, St. Augustine wrote concerning this verse:
For he said, “Fear not them which kill the body, but are not able to
kill the soul.” See where He advised us not to fear. See now where He
advised us to fear. “But,” saith he, “fear Him who hath power to
destroy both body and soul in hell.” [Matthew 10:28]. Let us fear
therefore, that we may not fear. Fear seems to be allied to cowardice:
seems to be the character of the weak, not the strong. But see what
saith the Scripture, “The fear of the Lord is the hope of strength.”
[Proverbs 14:26 (Septuagint)]. Let us then fear, that we may not fear;
that is, let us fear prudently, that we may not fear vainly. The holy
Martyrs on the occasion of whose solemnity this lesson was read out of
the Gospel, in fearing, feared not; because in fearing God, they did
not regard men.1
John Calvin (along with the other Protestant Reformers) follows in the footsteps of Augustine, writing that:
We must understand Christ to say that, when we succumb to the fear of
man, we show no respect for God; that when, on the contrary, we show
proper reverence to God, victory is easy and in our hands, and no
human power can pull us away from our duty.2
In the 4th century, St. John Chrysostom also wrote about this passage, saying:
“Fear ye not therefore; ye are of more value than many sparrows.” [v.
31]. Seest thou that the fear had already prevailed over them? Yea,
for He knew the secrets of the heart; therefore He added, “Fear them
not therefore;” for even should they prevail, it will be over the
inferior part, I mean, the body; which though they should not kill,
nature will surely take with her and depart. So that not even this
depends on them, but men have it from nature. And if thou fear this,
much more shouldest thou fear what is greater, and dread “Him who is
able to destroy both soul and body in hell.” And He saith not openly
now, that it is Himself, “Who is able to destroy both soul and body,”
but where He before declared Himself to be judge, He made it manifest.
But now the contrary takes place: Him, namely, who is able to destroy
the soul, that is, to punish it, we fear not, but those who slay the
body, we shudder at. Yet surely while He together with the soul
punishes the body also, they cannot even chasten the body, much less
the soul; and though they chasten it ever so severely, yet in that way
they rather make it more glorious.3
As has been demonstrated, interpretations of this passage throughout history understand God as the object of fear in v. 28.
1 Augustine of Hippo, "Sermons on Selected Lessons of the New Testament", trans. R. G. MacMullen in A Select Library of the Nicene and Post-Nicene Fathers of the Christian Church, First Series, Volume VI: Saint Augustin: Sermon on the Mount, Harmony of the Gospels, Homilies on the Gospels, ed. Philip Schaff (New York: Christian Literature Company, 1888), 306.
2 Joseph Haroutunian and Louise Pettibone Smith, Calvin: Commentaries (Philadelphia: Westminster Press, 1958), 264.
3 John Chrysostom, "Homilies of St. John Chrysostom, Archbishop of Constantinople on the Gospel According to St. Matthew", trans. George Prevost and M. B. Riddle in A Select Library of the Nicene and Post-Nicene Fathers of the Christian Church, First Series, Volume X: Saint Chrysostom: Homilies on the Gospel of Saint Matthew, ed. Philip Schaff (New York: Christian Literature Company, 1888), 229.