Hello
There are two types of For iteration activities in UiPath - For Each and For Each Row.
For Each activity is used to iterate through any type of collection, whereas For Each Row is used to iterate specifically through a datatable. It sets the object type to the desired type. In your case, For Each Row activity can help resolve this error.
Hope this helps.