This section assumes you're a junior dev.
First off, be more humble. There's a reason they're a senior dev and you're only a junior. Now, your boss seems like hes trying to create some collaboration between the dev team. Additionally, you can never tell someone you don't want/need their advice when your new to a company - which I'm assuming you are.
With your situation I would suggest telling the senior dev that you should ask him if it's ok to come talk to him if you have any issues/in need of advice. You sohuld also say that when it comes to your work you like, not prefer, to try everything to solve a problem yourself before asking for help first. This shows your commitment to solve issues but also that you know help is available should you need.
You have to bare in mind that whilst he the senior dev might not know much about the stack or project or whatever you're working on they will have more knowledge than you on how the company works, processes, general experience - the list goes on.
This section assumes your a mid/senior dev.
Ask your boss if they had anything specific in mind your colleague could advise you on and (if unsatisfied) then express your concern that it shouldn't be a formal thing and just more "if required" type deal. Also see paragraph 2.