From a linguistic point of view the term “good” is used at Mark 10:18 in a specific way. It is preceded by λέγω with the sense “to identify in a specific manner, call, name.” [3] Thus, this is not merely a case where the adjective is being used to describe Jesus as “good.”
That it was used rather as a title can also be seen from the fact that Διδάσκαλε ἀγαθέ, “Good Teacher” is in the vocative of direct address. As a result all English versions capitalize the title as in “Good Teacher.”
Jesus responds to being identified with this title by asking him why he “named” him (ie identified) in that way and corrected him saying that “no one is good except one, God” or “except God alone” both with the same meaning.
The Bauer-Danker-Arndt-Gingrich Greek lexicon (BDAG) speaks directly to your question regarding Jesus’ deity and this verse. That Greek lexicon says to compare Mark 10:18 as evidence that the term θεός does not equate Jesus with his Father and therefore does not violate the Shema of Dt. 6:4, the very basis of Jewish and Christian monotheism. [4]
It is of great interest that the early church understood “God” here to be a reference to the Father in both Greek and Latin. [5]
While all Christians consider Jesus to be good in a moral sense, we are advised by Jesus himself that his Father is the standard of “good.”
In fact, in a prayer to his Father he described his Father as “the only true God” at John 17:3.
[3] BDAG 4531 λέγω
4. to identify in a specific manner, call, name (Aeschyl. et al.) w. double acc. (Epict. 2, 19, 19τί Στωικὸν ἔλεγες σεαυτόν; Diog. L. 8, 88 τὴν ἡδονὴν λέγειν τὸ ἀγαθόν=call pleasure the [real] good; 2 Macc 4:2; Just., D. 61, 1ἀρχηστρατηγὸν ἑαυτὸν λέγει) τινά τι describe someone as someth. **τί με λέγεις ἀγαθόν; why do you call me good? Mk 10:18; Lk 18:19. ** Δαυὶδ λέγει αὐτὸν κύριον David calls him Lord Mk 12:37.
[4] BDAG θεος
2. Some writings in our lit. use the word θ. w. ref. to Christ (without necessarily equating Christ with the Father, and therefore in harmony w. the Shema of Israel Dt 6:4; cp. **Mk 10:18 and 4a below)**, though the interpretation of some of the pass. is in debate.
[5] Clement of Alexandria Strom. V. 10.63 (c. 260 CE)
"And if, the Creator above all is confessed to be just, and the Lord to be the Son of the Creator; then the Lord is the Son of Him who is just. Wherefore also Paul says, "But now the righteousness of God without the law is manifested; " and again, that you may better conceive of God, "even the righteousness of God by the faith of Jesus Christ upon all that believe; for there is no difference." And, witnessing further to the truth, he adds after a little, "through the forbearance of God, in order to show that He is just, and that Jesus is the justifier of him who is of faith." And that he knows that what is just is good, appears by his saying, "So that the law is holy, and the commandment holy, and just, and good," using both names to denote the same power. But "no one is good," except His Father." [ hEIS AGAQOS, hO PATHR ]
Hippolytus - haer. V.7.25 (pre-222 CE)
'They affirm, then, concerning the substance of the seed which is a cause of all existent things, that it is none of these, but that it produces and forms all things that are made, expressing themselves thus: "I become what I wish, and I am what I am: on account of this I say, that what puts all things in motion is itself unmoved. For what exists remains forming all things, and nought of existing things is made." He says that this (one) alone is good, and that what is spoken by the Saviour is declared concerning this (one): "Why do you say that am good? One is good, my Father which is in the heavens , [hEIS ESTIN AGAQOS, hO PATHR EN TOIS OURANOIS] who causeth His sun to rise upon the just and unjust, and sendeth rain upon saints and sinners."'
Justin Martyr - Dial. 101.2 (c. 150 CE)
"Then what follows of the Psalm is this, in which He says: `Our fathers trusted in Thee; they trusted, and Thou didst deliver them. They cried unto Thee, and were not confounded. But I am a worm, and no man; a reproach of men, and despised of the people; 'which show that He admits them to be His fathers, who trusted in God and were saved by Him, who also were the fathers of the Virgin, by whom He was born and became man; and He foretells that He shall be saved by the same God, but boasts not in accomplishing anything through His own will or might. For when on earth He acted in the very same manner, and answered to one who addressed Him as "Good Master": Why callest thou me good? One is good, my Father who is in heaven.' (Luke xviii. 18 f.)"
the Pseudo-Clementine Homiles XVI.3.4 (c. 260 CE)
"AT break of day, when Peter went forth to discourse, Simon anticipated him, and said: "When I went away yesterday, I promised to you to return to-day, and in a discussion show that he who flamed the world is not the highest God, but that the highest God is another who alone is good, and who has remained unknown up to this time. At once, then, state to me whether you maintain that the framer of the world is the same as the lawgiver or not? If, then, he is the lawgiver, he is just; but if he is just, he is not good. But if he is not good, then it was another that Jesus proclaimed, when he said, "Do not call me good; for one is good, the Father who is in the heavens.'" [hO GAR AGAQOS hEIS ESTIN, hO PATHR hO EN TOIS OURANOIS]
What text can NT Textual Criticism ultimately Reach?
[William L. Peterson -- New Testament Textual Criticism, Exegesis, and Early Church History, a Discussion of Methods, page 142, edited by Barbara Aland and Joel Delobel]
Justin, Dial. 101.2
hEIS ESTIN AGAQOS, hO PATHR MOU hO EN TOIS OURANOIS - "One is good, my Father in the heavens."
Taitian Diatessaron (c. 172 CE), as per Ephrem Syrus, Comm. on the Diatessaron, XV,9 (Syr & Arm]
"Unus est bonus, Pater, qui in caelo [est]."
Irenaeus, haer. I.210.2 (pre-185 CE)
"hEIS ESTIN AGAQOS, hO PATHR EN TOIS OURANOIS"
Hippolytus, haer. V.7.25 (pre-222 CE)
"hEIS ESTIN AGAQOS, hO PATHR EN TOIS OURANOIS"
Clement of Alexandria, Strom. V.10.63 (c. 207 CE)
"hEIS AGAQOS, hO PATHR"
the Pseudo-Clementine Homilies XVI.3.4 (c. 260 CE)
"hO GAR AGAQOS hEIS ESTIN, hO PATHR hO EN TOIS OURANOIS"
Vetus Latina MS e (apud Matthew; V cent)
"Unus est bonus, pater."
Vetus Latina MS d (apud Luke; V cent)
"Nemo bonus misi unus Deus pater."