US and NATO forces started putting Ukrainians through training soon after Russia attacked Ukraine in 2014.
As part of it, US instructors set up a replica of the “Q course” used by the US Army Special Forces for Ukraine “Q course” evaluates potential Green Berets and instructs them on the fundamentals of their line of work. It is safe to assume that US special operators have some sort of footprint in the country to assist Ukrainians with their training and logistical challenges, most likely through US intelligence agencies. US Special Operations Command doesn’t have an official presence in Ukraine and has adopted a “remote advise and assist” role there.
Source: https://www.businessinsider.com/us-developed-version-of-special-forces-q-course-for-ukrainians-2023-1