Let's just check the source:
Matthew 19:21-23
21 Jesus said unto him, If thou wilt be perfect, go and sell that thou hast, and give to the poor, and thou shalt have treasure in heaven: and come and follow me.
22 But when the young man heard that saying, he went away sorrowful: for he had great possessions.
23 Then said Jesus unto his disciples, Verily I say unto you, That a rich man shall hardly enter into the kingdom of heaven.
Luke 18:18-23 King James Version (KJV)
18 And a certain ruler asked him, saying, Good Master, what shall I do to inherit eternal life?
19 And Jesus said unto him, Why callest thou me good? none is good, save one, that is, God.
20 Thou knowest the commandments, Do not commit adultery, Do not kill, Do not steal, Do not bear false witness, Honour thy father and thy mother.
21 And he said, All these have I kept from my youth up.
22 Now when Jesus heard these things, he said unto him, Yet lackest thou one thing: sell all that thou hast, and distribute unto the poor, and thou shalt have treasure in heaven: and come, follow me.
23 And when he heard this, he was very sorrowful: for he was very rich.