You sure there are good connections on the wiring to the starter and battery? Make sure all contacts and terminals are cleanand free of shit, clean them up with some emory paper or sand paper.
I had a similar situation once where the battery started another car but wouldn't start the problem car, so I removed the starter, that was fine, put it back on with a second battery and wouldn't start, turns out I had disturbed the wiring when I removed the starter motor.