They both have to do with complexity in terms of a bitlength but there the similarity ends.
The $b-$ bit security uses the brute force number of guesses $2^b$ which would be required in the worst case to determine a $b-$ bit key (since there are exactly as many possible keys).
In cryptography, the security parameter is a variable that measures the input size of the computational problem. Both the resource requirements of the cryptographic algorithm or protocol as well as the adversary's probability of breaking security are expressed in terms of the security parameter.
The security parameter is usually expressed in unary representation (for example, a security parameter of $n$ is expressed as a string of $n$ 1s
Note: this is your $1^n$
so that the time complexity of the cryptographic algorithm is polynomial in the size of the input.