Greek and Aramaic were spoken at that time. But the oldest manuscripts of the Gospels were written in Greek, which was a more widely used language.
And as far as masculine and Feminine conjugations go, proper nouns have nothing to do with it. For example, in Latin, a simlar langauge to Greek, the name of a certain legion commander was Agricola. It would have been congugated into the usual nominative, genitive, dative, accusitive, and ablative cases just like any feminine noun would have been.
Ex.
Terra-meaning "ground, earth"-First conjugation, Feminine
Singular Plural
Terra Terrea
Terrea Terrarum
Terrea Terris
Terram Terras
Terra Terris
So Agricola would have been the same-Agricola, Agricolea, Agricolea... and so on.
And in Petros, "os" is a masculine ending. So apparently is was conjugated masculine for some reason or another. Some words could have alternative endings. So, it could have easily been Petro or Petra. But don't quote me on that part because I'm note a Greek student. "Intelligo nihil re."
Just a little lesson to brighten your day.