Try this test:
sed 's/^ "peer-port": [0-9]*,/ "peer-port": '"${newport}"',/' settings.json
...examine the output, and if it looks good, add an -i to actually change the file like so:
sed -i 's/^ "peer-port": [0-9]*,/ "peer-port": '"${newport}"',/' settings.json
Notes: the substitution strings may need a little tweaking, (i.e. replacing " " with "\t"), depending on whether the whitespace is spaces or tabs.
A more compact and efficient, (but maybe less portable), method:
sed `/^ "peer-port": /{s/ [0-9]*,/ '"${newport}",'/;q}' settings.json