When you look through the finder and depress the shutter button half way, do you see one of the focus marks illuminate red?
If it does not light on the item you want focused, it is focusing on something else.
When you say the image is out of focus, do you mean on the back screen or through the finder?
If it is through the finder, have you adjusted the eyepiece to your eye? This done by putting on the lens cap and turning off the AF.
Then looking through the finder with the shutter depressed 1/2 way, focus the display numbers in the finder until sharp. then when you turn on the AF and focus everyhting should appear sharp. Never try to set the eyepiece diopter using an image. Always use the number display
with the lens cap on.
If this doesn't help then you have a defective camera or ens.
Rod