Nah, you're okay. My camera does this on autofocus sometimes, too.
The brain box inside the camera is programmed for the average user, so it's trying to focus on stuff that's at least "selfie" distance away from the lense. So, 20" or more. Roughly.
Your camera should have a "macro" mode somewhere, and if you can find that, it will usually focus on what's right in front of it.
If it's still being derpy, try putting a clean background behind your knife. White paper works really well, but I've used text books, graph paper, bandanas...