A chastened John B. Crowell Jr., the assistant secretary of agriculture for natural resources and environment, ate some crow yesterday, retracting his suggestion that two major environmental organizations were infiltrated by socialists and communists.

Crowell made an apology before television cameras at a press conference called by Secretary John R. Block to announce that he had named an old friend, a Republican and hog farmer from Missouri, Peter C. Myers, to head the Soil Conservation Service.

Block's decision to replace Norman A. Berg, chief of SCS since 1979 and an SCS professional for 39 years, has created an uproar in conservation circles and alienated a number of farm state legislators. Among others, Sen. Roger W. Jepsen (R-Iowa), chairman of a soil conservation subcommittee, unsuccessfully urged Block to retain Berg.

Among the first to react to the decision yesterday was the American Foresters Association, which issued a statement critical of Block for choosing a farmer with no technical background in soil conservation to head SCS.

Block, insisting that Berg was not "fired," said Myers' appointment fulfilled a campaign promise by President Reagan to put farmers in top policy jobs at the Department of Agriculture. He said Berg will continue at USDA in a high-level advisory capacity.

The secretary said that he and Berg, whom he called "an outstanding professional," had never disagreed on policy. But, he said, he felt the change was "the right and correct and proper thing to do" in light of Reagan's campaign pledge.

Myers, 51, was introduced briefly to reporters, but he declined to comment on changes he might invoke at the SCS as it begins to oversee Block's controversial new soil conservation proposals. Myers said that as a farmer he had "professional . . .knowledge of soils."

Crowell made his cameo appearance just as reporters were pressing Block on whether he agreed with Crowell's published remark that socialists and communists had infiltrated the Sierra Club and the Audubon Society.

Block said he had not had a chance to talk to Crowell. Then he added, "I've never belonged to those organizations. I don't know what is in the ranks of them . . . we'll have to wait and see."

As Block hemmed and hawed a bit more, Crowell bounded out of the audience and took the podium. Red-faced and apparently contrite, he said he had made "a mistake" in alleging the organizations might be infiltrated and that he had "no reason to think the Audubon Society or the Sierra Club . . . are in any way un-American."

Crowell said his remarks, printed accurately earlier this month in the Albuquerque Journal, had created "a very unfortunate situation." He added that he was "mortified and shocked" to see the report. "I very much regret it . . . I hope I've learned from this," he said.