If you mean “pick up a weapon they’ve never seen before, in combat, and start from zero?” Very difficult. Actually, “difficult” might not be the right word, they would be fighting at a serious disadvantage. Without knowing the weapon they’re using, they’d be more likely to make exploitable mistakes when facing someone who’s actually been trained in that weapon.
If you’re talking about training in a new weapon, it varies. Some weapons transition easily into others, axes and hammers, or staffs and polearms. Even so, once you have a base, learning new weapons isn’t particularly difficult.
That said, swords are fairly difficult weapons to learn, and transitioning from an axe to a sword, or sometimes even between different types of swords, is non-trivial. Your character could certainly learn the sword, all it would take is time, dedication, and a willingness to learn new combat techniques.
Now, some of this might not be relevant, because combatants are rarely trained in one weapon exclusively. A medieval mercenary might favor an axe, but, depending on the quality of their training, they’d probably have a functional understanding of pole arms, maces, morning stars, crossbows, and most weapons, including swords, that were commonly used in their region. This was also true of knights (and their various counterparts), who would learn to use whatever weapon came to hand.
Low grade shock troops and basic infantry might only know one or two weapons, but for everyone else, versatility was how they stayed alive on the battlefield.