Turkish officials have detained 16 Indonesian citizens who confessed they were planning to cross the border into Syria, Indonesia's foreign ministry said.