Not quite. Attainder would be enacting a law which punished Trump by name without an actual trial (or necessarily even a crime). Congress can't enact a law which says "hank ernade is a bad person, and should be locked up in the federal penitentiary for 20 years because he's a bad person and we don't like him." The British Parliament could and did pass such laws.
Punishing someone's family members by such a law is the same thing, but the real issue is that there is no trial or opportunity to mount a defense involved.
Attainder is charging someone with a crime that someone else committed.