If you have Warranty or AppleCare make Genius reservation or set up Service and take or send to Apple for resolution. If no coverage, the internal switch can be fixed with a minute drop of glue, or if completely broken, replacement of the Power Button Flex cable. If you want to try Virtual Lock Button, tap Settings App > General > Accessibility > Assistive Touch > ON > tap new small white screen button > Device > Lock. This can even be used to turn iPhone OFF. To turn ON connect iPhone to power ie charger or USB port of computer.