D.C. Mayor Marion Barry, who came under criticism last month after he said he thought that if the slain youths in Atlanta were Jewish the authorities would have moved more quickly to solve the cases, will go to Jerusalem next week on a trip sponsored by two local Jewish groups.

Barry's air fare to Jerusalem, where he will attend the second annual Jerusalem Conference of Mayors, will be paid by contributions from the local Jewish community, coordinated by the local chapter of the American Jewish Congress and the Jewish Community Council, it was announced yesterday.

"I was aware of [the remarks]," said American Jewish Congress spokesman Steven Matthews in New York, "but obviously no one here was concerned enough about them to feel we ought to make a statement about them or anything."

Barry is one of nine American mayors invited to the conference, including Mayor Maurice A. Ferre of Miami and Mayor Philip L. Isenberg of Sacramento. Also invited to the conference are the mayors of Copenhagen, Montreal, Rio de Janeiro, Sydney and Zurich.

The theme of the conference, Matthews said, will be "Urban Problems in a Time of Austerity." Mayor Teddy Kolleck of Jerusalem will host the gathering, which will be held at Hebrew University starting next Sunday and running through the following Friday.

Mark Pearl, spokesman for the local chapter of the American Jewish Congress, said air fare for the trip will be financed by contributions from the local Jewish community, funneled through his group and through the Jewish Community Council. Barry will pay his expenses in Jerusalem out of his own pocket, he said.

The trip is the latest in a series for Barry, who in the last two weeks has also traveled to Gary, Ind., and Des Moines, Iowa.