It's pretty straight forward really. The trans comes out as mostly an assembly and can be extracted, swapped, and installed by a competent guy like you within probably 2-3 hours. Add a few hours to pull the engine, split and assemble the cases, (probably replace the primary chain too?) and you're really talking about a weekend.
The project gets longer if you decide, "While I'm at it...". I may have a spare trans in a spare motor that I could try to pull down if you struggle to locate one. But I am sure there's ample units out there. Often easiest to grab a spare motor and scavenge what you need.
Popping out of gear sometimes can be solved by undercutting the gears. It could be your forks, it could be... If you're willing to tear it down and diagnose it exactly, that could save you time and money.