Air force pilots and cadets were on the plane, the interior ministry said.
At least two people were injured and taken to hospital in a serious condition, and search continued for the others, Deputy Interior Minister Anton Gerashchenko said.
The crash happened around 2 kilometers (1.2 miles) from a military airport, the State Emergency Service of Ukraine said in a statement.
“The bodies of 22 people were found, two people were injured and the search for four people continues,” it said.
The plane was on a training flight, President Volodymyr Zelenskiy said in a statement, citing preliminary information.