Sadly, you can't.
In Melee, Ganondorf fights purely with his fists and his Warlock kicks — the sword moveset you might be thinking of belongs to his later appearances. There's no toggle, hidden input, or unlock that changes this. If sword-based Ganondorf is what you're after, the Brawl and later games are where he picks up the blade.