I couldn't tell if you have 3 hours until your flight departs or until you need to arrive at LGB.
Depending on traffic (and on this route, it REALLY depends on traffic) it will take between 20 minutes and 1 hour to get to LGB, but longer delays can happen if there are accidents.
If you're leaving LAX after about 1:00 pm and heading South, I'd estimate 30-35 minutes. You should be fine assuming no flight delays, customs problems, or major traffic issues. If you do miss your flight, standing by for a later one on Jetblue is usually not a problem.
Should you find yourself with extra time, one of the airport shuttle services would likely be half the price and only take an extra 10-15 minutes (mostly waiting time).