Statistical mechanics approach to the jamming transition in granular materials