Context Please! Jesus never said he was not Good. He ask " Why callest thou me good? none is good, save one, that is, God" (see Matthew 19:17, Mark 10:18, and Luke 18:19). This is not a denial of His Goodness, but a question to the man to see if the man understood who Jesus was?
It all relates to another passage of scripture:
When Jesus came into the coasts of Caesarea Philippi, he asked his disciples, saying, Whom do men say that I the Son of man am? And they said, Some say that thou art John the Baptist: some, Elijah; and others, Jeremiah, or one of the prophets. He saith unto them, But whom say ye that I am? And Simon Peter answered and said, Thou art the Christ, the Son of the living God. And Jesus answered and said unto him, Blessed art thou, Simon Bar-jona: for flesh and blood hath not revealed it unto thee, but my Father which is in heaven.
Matthew 16:13-17
Christ asks who others say He is. The response the disciples gave was John the Baptist, Elijah, Jeremiah, or one of the prophets. But it was Peter who could correctly answer the question.
But that still wasn't "good". "Good" is a worldy measurement which means nothing in Heaven. The "good" people will burn in Hell just as the "bad" people will walk the streets of gold. The rich young ruler was "good" in the eyes of the world. If we saw the ruler today, we would call him a "good Godly man".
Peter is a classic example. Peter was a screwup but Jesus looked past that. Peter needed Jesus because he was "bad". The ruler was "good" therefore he didn't need Jesus.
There is no good and bad in Christianity. There is obedience and disobedience.