Formation of AlN by nitrogen ion implantation