If it's a home (residences) it needs functioning water and sewer. The Mortgage company won't give you a ---traditional--- loan without those.
Other possibilities are reconstruction loan, but has to be done by a qualified contractor , not you
Last option is cash or land contract, in that case you can buy whatever you want regardless of condition
But don't pay for it yourself, have the owner fix it then get a mortgage