IMO, the game is won or lost in the trenches. Clearly, both OL and DL are not good enough. I would prioritize the OL as the top problem to address. There are several other areas of need, but you have to protect your franchise player first.
I think the jury is still out on James Cook, but I have seen enough of Singletary. He has no burst or explosiveness, no speed, no power, and mediocre evasiveness.
I think the jury is still out on Khalil Shakir, but after Diggs the WR corp is not good enough. Gabe Davis was a huge disappointment. The others are journeymen.
Greg Rousseau shows promise, but Epenesa, Basham, and the others are not good enough. The linebackers as a group are not playmakers. Just check out the athleticism and explosiveness of the 49er's linebackers as an example. No comparison.
No point in going on and on, but Beane and McD have built a team incapable of winning the Super Bowl at this point. The four teams left in the playoffs are all superior to the Bills.