Why does this button function always return 1 when nothing is pressed?

Hello
Welcome to the Arduino fora.
Before you do anything else please take a moment to read General guidance and
How to use this forum
Especially item #7 on posting code.

We need to see ALL your code, not just a bit of it. We also need to know how the buttons are wired.

I suspect you have not used pull down resistors or not wired your buttons correctly.