$l = log n$: $Pr[B(Un+logn)]≥2^n/2^{n+logn} * 1/p(n)$. Since even if the input of B is from the image of 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$.