IntelliJ replace variable names in multiple lines
Try to set cursor on variable and use shortcut Shift-F6 - after that there are dialog frame for change name of variable and it changes all occurences of variable to setted name.
Also, you can use shortcut Ctrl-Shift-R for replacing any word in project, it is useful if you working with huge project or your variable appears in config files.