I agree with the other comments.
Terms belonging to folklore like this tend to have many different versions of spelling and pronunciation, depending on the region. It's impossible to give a definitive answer. But however you spell 'bogeyman', as we say in the UK, this isn't an 'evil wizard'. It's just a general figure of fear, often used to frighten children.