Yes. And he's not the first to run a campaign from prison (though he likely won't go to prison for the 34 felonies. Prison is extremely rare for those kinds of charges. even if he wasn't trump.)
Not only is the substance of the charge different, Cohen's crimes were federal where Trump's conviction is state.
the charges that trump is guilty of, the sentencing very, very rarely includes prison time. (because we live in a fucked up country where you can get away with anything as long as you're a business.)