If it was from trade, I think it takes a while to get used to you or something :/
Happened with my shiny Eevee, but that evolved eventually.
Just keep doing what you're doing.
Don't deposit it in pc, give it vitamins, give it massages, it should eventually evolve.
Also, try pacing if...