In your example you are using the unit id's in that function, its like saying you want to put someones name into a car instead of a person and wondering why they are not in the car.
What you would want to do is create the units first, for example. Actually I'm not sure how the units are being created but you get the idea.
local unit1 = armybrain:CreateUnitNearSpot('UEB0101', posX, posY)
local unit2 = armybrain:CreateUnitNearSpot('UEB0101', posX, posY)
ScenarioFramework.AttachUnitsToTransports({unit1, unit2}, {transport})
p.s just to clarify your confusion. The function takes a table of objects rather than the table being an object itself.