Whenever I try to walk to Kellogg he gets hostile without me even talking to him. is it Nick or something else? I tried telling Nick to wait outside and I even dismissed him. Please help.
It's happening because if Kellogg doesn't die, you can't finish the game. *
(1) equipped power armor,
(2) companion is hostile,
(3) weapons is not holstered,
(4) bug or glitch happening while you walk to him.
(5) There's probably a script that keeps checking if he isn't hostile, to make him hostile, to facilitate progression.
(*) Guy Beats Fallout 4 Without [they themselves personally] Killing Anyone, Nearly Breaks The Game – kotaku.com (the hard part was Kellogg, because he must die)