I posted this issue a while ago, and since I can't find the thread again, I decided to repost it.
Long story short, if a Pokémon meets their evolution conditions after a battle meaning they're going to evolve, there's a chance that instead of evolving correctly, they will evolve into itself and will refuse to actually evolve even if you level them up or give them a Rare Candy, until you restart Minecraft.
I just had it happen to me again, and I think it could be caused by having a Pokémon die on you during a battle?
Context: I found a Mega Pinsir Boss in a Flower Forest. It killed my Charizard because it was faster but I managed to win regardless.
I then proceeded to fight an NPC Trainer with Lv80 something Pokémon, and after that fight, both my Deino and my Larvesta were ready to evolve.
Somehow, Deino managed to evolve successfully, but Larvesta stood there on the ground shining as if it was about to evolve. It stayed like that, so I decided to restart Minecraft. That's how I always solved the problem. Simply logging out of the server doesn't work for some strange reason.