I usually say "It's been two weeks since i spoke with him" to mean that i spoke with him 2 weeks ago. Is it grammatically correct to use the past progressive (I was speaking with him) instead?
To use the progressive here, you would have to be providing a descriptive backdrop for something dramatic to happen. For example,
Two weeks ago, I was chatting with my friend, when the house began to shake and all the crockery fell off the shelves.
Just to report how long it's been since you've spoken with your friend, do not use a progressive tense.
(This is something my German spouse struggles mightily with. You are not alone.)
A time definite ("two weeks ago") and the simple past ("I spoke") give a specific point in past time of your last conversation with him. The past progressive ("I was speaking") indicates an ongoing action and thus implies an interval, which is somewhat incompatible with the specific point two weeks ago.
If you want to indicate that you used to have ongoing conversations during an interval before a particular past point, use the past perfect progressive:
Up until two weeks ago I had been speaking with him regularly.
But there is a difference and both are correct but it differs in the nuance conveyed, whether you think this through as a native speaker or not... The sentence, I was in NY last week and was speaking with him or I was in Ny week and spoke with him are indeed different, the first suggests a narrative reliving the moment and the experience of being there and often more narrative of that event in that real time "ing" will convey that and flesh out the alive conversation. You are revisiting the moment.. I spoke with him is a simple declarative past and the generic description of something done completed, stands on its on , is neutral