Jockeying between the United States and South Korea over the immediate future of opposition leader Kim Dae Jung was settled yesterday with word from Seoul that Kim will not be imprisoned when he returns from Washington next week.

The White House, in a move closely related to the maneuvering, announced that South Korean President Chun Doo Hwan will make an official working visit to President Reagan in April.

The Korean opposition leader, in a telephone interview, welcomed the news that he will not be imprisoned as an indication of "a reasonable attitude" on the part of the Chun government. "I will also respond with a reasonable and careful attitude when I go back," he said.

The prospect that Kim would be imprisoned on his return to Korea Feb. 8 had thrown a cloud over the Chun visit, which originally was to be announced a week ago. The Reagan administration delayed any announcement while making clear its displeasure at the prospect that controversy over the imprisonment of the opposition leader could dominate the public aspects of the Reagan-Chun meeting.

On Jan. 24, in the first indication of a change of heart in Seoul, the South Korean Embassy disavowed the statement of a senior Chun aide that the opposition leader would be imprisoned "as a revolutionary" when he returns from his two years in exile in the United States.

The South Korean government informed the U.S. administration through diplomatic channels earlier, according to knowledgeable sources, that Kim will not be imprisoned, but permitted to reside at his home in Seoul and to have visitors, though he will not be allowed to travel freely or to participate openly in political life.

A group of 20 prominent Americans, including three members of Congress, plan to accompany Kim to Seoul to guarantee his safety as he returns to his native soil. The South Korean authorities have assured the Reagan administration that Kim's return will be safe and "trouble-free," a word that the State Department has used repeatedly to describe its hopes for the return of the Chun government's most famous and outspoken political opponent.

Kim was sentenced to death for sedition in 1980, in what widely was regarded as a political prosecution. Chun commuted the sentence to life imprisonment shortly before visiting Reagan in February 1981. Later the sentence was reduced to 20 years. Kim served 2 1/2 years before being exiled here in December 1982.

There was no guarantee of Kim's long-term future in the diplomatic message from the Korean government, sources said. An official said this was likely to depend on the course of political currents in South Korea and between that country and the United States.