EPR study of the peculiarities of incorporating transition metal ions into the diamond structure