Lanthanide impurity level location in GaN, AlN, and ZnO