The rhetorical device that attacks a distorted version of an opponent's position is called a straw man (or strawman) fallacy.