Gaining knowledge and qualifications is the way to grow in your job. Providing the qualifications are not legal qualifications (designing a building requires a qualified architect), this is your opportunity to grow.
You do need to let your boss know that it is going to take you longer than Bob, and let Bob know that you're going to need to bug him a lot in order to figure out the task.
Hey Boss, Bob - I don't know how to do this task, but I am willing to learn. I know it will take me longer than Bob as I learn it, and Bob, I'll need to ask you questions too. Please be patient with me.
Find out the best way to ask questions of Bob, perhaps one email with a list of questions or a short in-person meeting each day, or whatever works best for him. Make sure you keep the boss updated on your progress, so boss isn't blindsided when it's not done as soon as expected.
Sure, this will soon make this your pain in the rear task. But you will also be seen as someone who is willing to jump in and learn, and that attitude will help you learn and advance faster, perhaps faster than Bob.
BTW, this also achieves your goal of letting your boss know you're not qualified for the task. And if the boss wants it sooner or better, then they will tell Bob to do it. All the while you look like a team player who is willing to learn and help.
Update: If this job really will take a year to learn how to do, then one other thing you need to keep your boss updated on is the other work you have assigned that is not being done. Let the boss know that tasks W, X, and Z will not be done while you figure out how to do task K, and if work needs to be prioritized differently, putting K on the back burner while you work on tasks W and Z, you are willing to do that. In other words, always keep your boss updated on both what is being done and what isn't being done. Do it in an informative rather than combative manner.