Ok, here is the problem.

I am unable to address ping sensor using "duration"

"duration" is the length of the pulse returned by the sonar, so I'm afraid I don't understand what you are trying to do.

 int rightCheck = digitalRead(pingPing);
  if (pingPing < 10) {

Whether digitalRead returns HIGH or LOW, both will always be less than 10.

Edit: Misread: dxw00d is correct.
There are plenty of examples for the Ping, where a function is written that returns the range, for a Ping on a given pin.