The mechanic you mention did not survive the transition to 5th Edition, as you've noticed. Most creatures now either just don't have the trait anymore, or have the trait that gives them Advantage on saving throws against magic. A few creatures are also flat-out immune to specific spells.
So the most straight-forward conversion would simply be to grant your creatures that trait and be done with it. There'll be a few weird edge-cases, but if you want simple and functional, that's the solution. If one of the specific spells like Sleep or Magic Missile bothers you, you might simply grant them immunity to those, to preserve the old feeling.
Alternatively, you'll need to come up with something yourself. The most straight-forward option is to simply do a 1-to-1 conversion of the old ability. That will work, although you'll have to explain it to your players, since it's outside the way spells normally work.
For what it's worth, I actually used creatures with an ability somewhat like this. I'll write it down here, in case the feature or the feedback I got from it are useful to you. These creatures were Living Spells and they could eat spells, but the ability should pretty much function like your idea of Magic Resistance while still being somewhat in line with the way 5e works if you just drop the healing part.
If the [living spell] is the target of a spell with a level of [x] or less, it rolls a d20. On a roll of 11 or better, the [living spell] is not affected by the spell at all and regains 1d6 hit points per level of the spell.
The spell level cap allows players to overwhelm magic resistance by using more resources (better spells) while the flat "11 or better" makes the ability more likely to matter (a 20% resistance likely never triggers in the average encounter).
As far as feedback goes, the main points are:
- these things were very hard to kill due to their devour ability
- spellcasters did not have an awful lot to contribute to this fight
- the ability was initially very confusing to my players, because it's not an expected part of D&D 5e
So as I said; if you want to make this a common part of your world, definitely explain exactly how the mechanic works. Keep in mind it makes monsters that have it very tough to deal with, especially for spellcaster heavy parties and that excessive use will likely bore them out a bit. Having half your attacks fail with not much you can do about it, isn't particularly fun and because the mechanic isn't a core part of the game, there exists no way around it. (Unless you make one.)
It worked for me as a flavour-full and rare thing, but it did show me that this was not something I'd want to use more often than "rarely". Whatever you come up with as a conversion rule; those are probably the things you'll need to keep in mind.