The effect of structural distortions on the electronic structure of carbon nanotubes