Is it unethical to accidentally benefit from online material in a take-home exam?
I suggest that you don't lose a lot of sleep over something that happened several years ago. While you may have crossed a line, your description suggests it wasn't a bright line. Assuming your description is honest, you started out (probably) appropriately looking for alternate explanations of the material, not solutions to the problem at hand. But, rather than the internet it might just as well have been a different textbook.
But if it bothers you, then, assuming you are an academic, make sure that your own students get more explicit advice about what is and is not permitted.
It would have been better, of course, if you had pointed out the situation to the professor. But let the past be the past. Make the future better than the past if you are able.