The short answer: no, a GameCube controller will not work on a Nintendo 64. While both are Nintendo consoles, their controller interfaces are fundamentally incompatible.
If you're looking to play N64 games with a modern controller, consider a dedicated N64-style USB replica (like those from Retro-Bit or 8BitDo) or use an emulator on PC with any preferred gamepad.