A good substitute for Joshua Tree is Anza-Borrego Desert State Park in San Diego County, a drive of about two hours from the city. It's more desert scenery, with some pretty good badlands, mountains, bighorn sheep if you're lucky, ocotillo cactus, etc.
Even closer is Torrey Pines State Park (near La Jolla), which has scenic twisted rare pine trees on eroded high bluffs overlooking the ocean. It's not particularly big, though, so it's not worth a whole day, but good for a couple of hours.
Lisa