Add a dataflow task, inside it add an Oledb source and an Oledb destination.
Add a variable of type string , set Evaluate as expression to true and assign the following expression:
"SELECT '" + @[User::bdname] + "' , convert(char(30),dp2.name), convert(char(20),dp.name)
FROM sys.database_principals AS dp INNER JOIN
sys.database_role_members AS drm ON dp.principal_id = drm.role_principal_id
INNER JoIN
sys.database_principals AS dp2 ON drm.member_principal_id = dp2.principal_id
WHERE (dp2.principal_id > 4) AND (dp2.type <> 'R')"
(Assuming bdname value is stored in user::bdname variable)
In the Oledb source set the source type to Sql command from variable and choose the created variable
Map the oledb source to the oledb destination
UPDATE 1
After reading your comment "...This foreach loop will query the sys.databases for all the user databases, and it is supposed to iterate that variable, to get the permissions".
To iterate over databases you have to add an Execute SQL Task with an SQL Command
SELECT name from sys.databases
and set the Result Set to Full Result Set , and assign the Result Set to a variable of type Object
Link this Execute SQL Task to the ForEach Loop Container
In the foreach Loop Container change the enumerator type to Ado enumerator and choose the object variable as source


Also don't forget to set the Dataflow task Delay Validation property to True
UPDATE 2 (workaround)
Try joining your query with sys.databases instead of using Foreach loop container (i don't know if it achieve what you want to do)
SELECT db.name, convert(char(30),dp2.name), convert(char(20),dp.name)
FROM sys.database_principals AS dp INNER JOIN
sys.database_role_members AS drm ON dp.principal_id = drm.role_principal_id
INNER JoIN
sys.database_principals AS dp2 ON drm.member_principal_id = dp2.principal_id
INNER JOIN sys.databases as db ON db.owner_sid = dp2.sid
WHERE (dp2.principal_id > 4) AND (dp2.type <> 'R')