Isometries of JB-algebras