"折磨" and "困扰" can be rather different. "折磨某人" means to torment somebody, to let somebody suffer physically or mentally. That can be cruel. "困扰某人" is just to bother or to disturb someone, let him/her feel confused or be in a bad mood.
e.g. "这个难题折磨着我" - This problem is making me suffer. "这个难题困扰着我" - This problem is bothering me.