Mr Museveni's forces are supporting South Sudanese President Salva Kiir against rebels led by the former deputy president Riek Machar.
The presence of Ugandan troops has drawn sharp criticism from rebels. South Sudan's other neighbours and Western powers worry that it complicates efforts to end a conflict that erupted seven months ago and which has driven the nation towards famine.
A Ugandan official said the timing of any withdrawal would be decided by Uganda alone and not "dictated" by others.
Ugandan Foreign Ministry spokesman Fred Opolot would not give details of the agenda for talks but said: "It will generally be around finding a way out of the impasse."
The warring factions have held months of peace talks in the Ethiopian capital Addis Ababa since fighting erupted in mid-December, but there has been little progress.
Two ceasefire deals have been reached, in January and in May. Oil producer South Sudan is a major export market for Uganda and trade has been hurt by the eruption of fighting.