Jesus admonition to "love thy neighbor as thyself" is right before his famous statement that you reference in regard to "prosperity doctrine"... the "camel through the eye of a needle" lesson
Jesus was asked what a person should do to get into heaven/gain God's favor, etc., and he responded by telling them essentially to obey God's laws and finished with "love thy neighbor".
16 Now behold, one came and said to Him, “Good Teacher, what good thing shall I do that I may have eternal life?” 17 So He said to him, “Why do you call Me good? No one is good but One, that is, God. But if you want to enter into life, keep the commandments.”
18 He said to Him, “Which ones?” Jesus said, “‘You shall not murder,’ ‘You shall not commit adultery,’ ‘You shall not steal,’ ‘You shall not bear false witness,’ 19 ‘Honor your father and your mother,’ and, ‘You shall love your neighbor as yourself.’ ” - Matthew 19:16-19
Then Jesus gives the lesson that as you say, contradicts "prosperity gospel".
20 The young man said to Him, “All these things I have kept from my youth. What do I still lack?” 21 Jesus said to him, “If you want to be perfect, go, sell what you have and give to the poor, and you will have treasure in heaven; and come, follow Me.” 22 But when the young man heard that saying, he went away sorrowful, for he had great possessions. 23 Then Jesus said to His disciples, “Assuredly, I say to you that it is hard for a rich man to enter the kingdom of heaven. 24 And again I say to you, it is easier for a camel to go through the eye of a needle than for a rich man to enter the kingdom of God.” 25 When His disciples heard it, they were greatly astonished, saying, “Who then can be saved?” 26 But Jesus looked at them and said to them, “With men this is impossible, but with God all things are possible.” Matthew 19:20-26
So Jesus famous "camel through the eye of a needle" statement seems to cut directly against the concept of prosperity gospel.