The playstyle is very different. Moon Druid can turn into a beast and go into melee but you won't hit as hard or be as tanky as a barbarian while doing it.
Think of Moon Druid more as a control and support melee character. You can drop your powerful battlefield control spells like Spike Growth to hinder large groups of enemies as a caster. Then as a beast most of your forms are loaded with control options to lock enemies down so your allies can wail on them or keep enemies off your squishies so they can cast unhindered.
Owlbear has a lot of knockbacks and fear available. Saber-tooth Tiger and Earth Elemental have knock-prone auto attacks. Dilophosaurus has a lunge to knock enemies prone too.
That is mostly how I played in my campaign. I'd drop Spike Growth to slow down and deal massive damage to large groups of weaker enemies as they try to run through, then charge the biggest threat in the room and try to lock it down by making it fall prone every round while Karlach tore it to pieces.
Moon Druid also has incredible access to summons which further diversifies your capabilities. The Dryad and her Woad Warrior can both spam Entangle to restrain groups of enemies while the Earth Elemental can knock enemies prone just like your own form can. With summons the druid probably greatly outpaces the barbarian as a tank too, as there are now multiple bodies on the field eating hits that would otherwise go to a party member.
The best part is summons don't need concentration. You can roll in with up to five summons, six if you count the giant vine, that can swarm the field and distract whole groups of enemies while you concentrate on Spike Growth to bog down a whole flank. All the while using focused control effects on enemies in melee with your beast attacks.
You absolutely should not ignore your spellcasting as a moon druid. Even if you're in beast form for most of the fight you can still have massive battlefield influence through spells you don't need to keep casting every round.
Druids are kings of battlefield control. Moon Druid is too. They just do it by turning into something big and bullying the boss the entire fight.