First off if it's under warranty take it to the dealer.
That would seriously be the easy solution, granted you might hit on the problem first thing you check but there's also a good possibility you'll have to go down a list of these:
That being said...
In my experience with my mower it is rarely the PTO switch, however I have learned it pays to order a spare one so we have a switch that's known to be working in order to test and troubleshoot this part. And it still would not likely be the first thing I would look into, but it's nice to have this part around.
Here would be the list of things I would run down to fix this problem:
* Battery posts / terminals need a cleaning, this often overlooked but simple procedure can create all sorts of electrical gremlins if left unattended for long. In some cases corrosion can develop in as little as 30 days. Once re-connected I like spraying them with a bit of "Battery Terminal Protector," comes in a can, costs about $8, a little goes a long ways.
https://duckduckgo.com/?q=crc+05046+battery+terminal+protector
Cleaning and then spraying the posts/terminals once usually takes care of this problem for me anywhere from 6 months to 2-5 years.
Possibly a bad connection down at the clutch itself... There is a plug where the clutch plugs in to the two wires coming from the mower, that plug or the wires inside can come loose and in my case resulted in symptoms such as yours.
Seat safety switch is another possibility, if it's not the switch check the wires and plug going there as well.
The control handles can have safety switches, worth checking those.
Ignition switch and connections, once again it is most likely a loose connection.
And of course, PTO switch and its connections.
And it could be either switch in itself thou that is not as common.