$l = log n$: $Pr[B(Un+logn)]≥2^n/2^{n+logn} * 1/p(n)$.$$l = \log n: \Pr[B(Un+\log n)]≥2^n/2^{n+\log n} \cdot 1/p(n)$$ Since even if the input of B$B$ is from the image of G$G$, the probability to invert it is $1/p(n)$. So you need to correct this case and it will help you with $l = 1$.