In a knowledge test, (I) had the highest score in the school. But the second-best score wasn't far behind, only one point lower.
I got first in the school on the academic test. But there wasn't much between me and the person who got second place. It was only one point different.
学力テスト academic test
校内 in the school
１位でした I got first place
２位 second place
ほとんど差がなく there wasn't much between/there wasn't much difference
１点差でした one point different