So i know bitcoin private key is secure and there are 2^256 private keys
Number of valid private keys is slightly less than 2
256it's impossible for 2 people to generate the same btc private key.
Not completely impossible. Almost impossible and very very unlikely.
BUT what i think is possible is a bitcoin wallet generating a bitcoin address whose private key is in the range of 1 to say 10000?? then it's vulnerable to attack right?
Yes, that's possible if the wallet hasn't been coded properly and that's why you should always an open-source wallet to know how the keys are generated.